Help with encrypt function

Hi there,

I need to include a simple encryption function in a C program and I came across this function

void encrypt(char block[64], int edflag)

whic is defined in #include des_crypt.h. According the man "the block argument to encrypt() is a character array of length 64 containing only the characters with numerical value 0 and 1". Any example of how to call this funtion properly?

In case I need to encrypt a string how do I create the blocks to be used by encrypt?

:confused:

Thanks,
Giggi

Consider using something other than DES, this has an example:

http://man.linuxquestions.org/index.php?query=encrypt&section=0&type=2