Manpage of XCRYPT
XCRYPTSection: Linux Programmer's Manual (3)
NAMExencrypt, xdecrypt, passwd2des - RFS password encryption
void passwd2des(char *passwd, char *key);
int xencrypt(char *secret, char *passwd);
DESCRIPTIONThe function passwd2des() takes a character string passwdof arbitrary length and fills a character array keyof length 8. The array keyis suitable for use as DES key. It has odd parity set in bit 0 of each byte. Both other functions described here use this function to turn their argument passwdinto a DES key.
The xencrypt() function takes the ASCII character string secretgiven in hex, which must have a length that is a multiple of 16, encrypts it using the DES key derived from passwdby passwd2des(), and outputs the result again in secretas a hex string of the same length.
RETURN VALUEThe functions xencrypt() and xdecrypt() return 1 on success and 0 on error.
VERSIONSThese functions are available in glibc since version 2.1.
ATTRIBUTESFor an explanation of the terms used in this section, see attributes(7).
|passwd2des(), xencrypt(), xdecrypt()||Thread safety||MT-Safe|
BUGSThe prototypes are missing from the abovementioned include file.
This document was created by man2html, using the manual pages.
Time: 16:30:12 GMT, October 09, 2016 Click Here!