SETKEY - set encryption key.

(Compatible with UNIX System V C)

Usage:

void setkey(key);

Where:

char key[64];
is a 64 character array. Array elements may only be the ASCII characters '\0' or '\1'.

Description:

The "setkey" function is used in conjunction with the "encrypt" function to encrypt and decrypt text using the NBS Data Encryption Standard (DES) algorithm.

"setkey" sets the key that all subsequent calls to "encrypt" will use for coding or decoding. This key is a bit string modelled on the "key" array (with a 0-bit for every '\0' character and a 1-bit for every '\1'). Because of the way the DES algorithm works, every 8th bit is irrelevant to the encoding. For example, the algorithm ignores the value of "key[7]".

See Also:

expl c lib encrypt

Copyright © 1996, Thinkage Ltd.