Hi, I am using RAND_bytes() to generate 32 byte random number (code snippet below). From here what i see if when access alt_value[0] it gives me "b2". So basically these array has got 64 bytes.
unsigned char salt_value[33]; RAND_bytes(salt_value, 32); sample o/p: b2ee922055a3adc17fdd5980db39ad343f73cb0ecca0b92dd8af6e2f4ef433c1 unsigned char temp_salt[32]; Now i need to copy these into different array of 32 bytes and when i do that only 32 bytes are copied and when i access temp_salt[0], i get "b" ; temp_salt[1] = "2" and so on... I also tried copying salt_value to a file and then read it back but again when i use fgets() to read 32 bytes, it runs into same problem... I need same format of salt_value to get replicated to temp_salt... How do i solve this issue? Please help me on this.., -Prashanth -- View this message in context: http://old.nabble.com/Need-help-on-using-RAND_bytes%28%29-tp33512085p33512085.html Sent from the OpenSSL - User mailing list archive at Nabble.com. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org