views:

197

answers:

4

Hello friends,

I have an array of strings.. I want to calculate the MD5 hash of these strings and want to store them in another array using libcrypt.h library in C++ in Linux...

So can anyone tell me how to do it?

give some exapmle or sample code..

A: 

the openssl library has a function that takes a string its in my "openssl/md5.h" header

it sounds like you might need to serialize the array hope that helps

pheonixus
Can you tell me that using any sample example..
Abhi
A: 

You'd have to serialize the array and then you can just run the encryption function on the serialized array.

See http://en.wikipedia.org/wiki/Serialization

Longpoke
A: 

The crypto hash functions are defined to take as input a sequence of bytes and output a sequence of bytes.

To get the hash value of a list of strings, you first need to translate, by some consistent mechanism, the list of strings into a sequence of bytes.

Justice
Can you give me a sample code so that i can try my strings on that function..
Abhi
A: 

Hi friends i Got the full reference of Using the functions on that link that i'm posting below :-

http://www.cryptopp.com/docs/ref/class_weak1_1_1_m_d5.html

Enjoy...:)

Abhi