[Previous] [Contents] [Next]

encrypt()

Encrypt a string

Synopsis:

#include <unistd.h>

void encrypt( char block[64], 
              int flag );

Library:

libc

Description:

The encrypt() function allows limited access to the NBS Data Encryption Standard (DES) algorithm itself. The block argument is a 64 character array of binary values. If the value of flag is 0, the block is encrypted; otherwise, it fails. The encryption is returned in the original array block after using the key specified by setkey() to process it.

Classification:

Standard Unix

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

crypt(), setkey()


[Previous] [Contents] [Next]