![]() |
![]() |
![]() |
Encrypt a string
#include <unistd.h> void encrypt( char block[64], int flag );
libc
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.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
![]() |
![]() |
![]() |