1 .\" Copyright 2003 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" this is the 3rd type of interface for cryptographic routines
4 .\" 1. encrypt() expects a bit field
5 .\" 2. cbc_crypt() byte values
6 .\" 3. xencrypt() a hexstring
7 .\" to bad to be true :(
9 .TH XCRYPT 3 2003-04-04 "" "Linux Programmer's Manual"
11 xencrypt, xdecrypt, passwd2des \- RFS password encryption
13 .B "#include <rpc/des_crypt.h>"
15 .BI "void passwd2des(char " *passwd ", char *" key ");"
17 .BI "int xencrypt(char *" secret ", char *" passwd ");"
19 .BI "int xdecrypt(char *" secret ", char *" passwd ");"
23 takes a character string
25 of arbitrary length and fills a character array
30 is suitable for use as DES key.
31 It has odd parity set in bit 0 of each byte.
32 Both other functions described here use this function to turn their
39 function takes the ASCII character string
42 .\" (over the alphabet 0123456789abcdefABCDEF),
43 which must have a length that is a multiple of 16,
44 encrypts it using the DES key derived from
48 and outputs the result again in
51 .\" (over the alphabet 0123456789abcdef)
56 function performs the converse operation.
62 return 1 on success and 0 on error.
64 These routines are present in libc 4.6.27 and later, and in
67 The prototypes are missing from the abovementioned include file.