DESCRIPTION
These functions encrypt and decrypt 64-bit messages. The setkey() function sets the key used by encrypt(). The key parameter used here is an array of 64 bytes, each of which has numerical value 1 or 0. The bytes key[n] where n=8*i-1 are ignored, so that the effective key length is 56 bits. The encrypt() function modifies the passed buffer, encoding if edflag is 0, and decoding if 1 is being passed. Like the key parameter also block is a bit vector representation of the actual value that is encoded. The result is returned in that same vector.
These two functions are not reentrant, that is, the key data is kept in static storage. The functions setkey_r() and encrypt_r() are the reentrant versions. They use the following structure to hold the key data:
struct crypt_data {
char keysched[16 * 8];
char sb0[32768];
char sb1[32768];
char sb2[32768];
char sb3[32768];
char crypt_3_buf[14];
char current_salt[2];
long int current_saltbits;
int direction, initialized;
};
"RETURN VALUE"
These functions do not return any value.
ERRORS
Set errno to zero before calling the above functions. On success, it is unchanged.