1 .\" Copyright 2003 walter harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
7 .\" this is the 3rd type of interface for cryptographic routines
8 .\" 1. encrypt() expects a bit field
9 .\" 2. cbc_crypt() byte values
10 .\" 3. xencrypt() a hexstring
11 .\" to bad to be true :(
13 .TH XCRYPT 3 2003-04-04 "" "Linux Programmer's Manual"
15 xencrypt, xdecrypt, passwd2des \- RFS password encryption
17 .B "#include <rpc/des_crypt.h>"
19 .BI "void passwd2des(char " *passwd ", char *" key ");"
21 .BI "int xencrypt(char *" secret ", char *" passwd ");"
23 .BI "int xdecrypt(char *" secret ", char *" passwd ");"
27 takes a character string
29 of arbitrary length and fills a character array
34 is suitable for use as DES key.
35 It has odd parity set in bit 0 of each byte.
36 Both other functions described here use this function to turn their
43 function takes the ASCII character string
46 .\" (over the alphabet 0123456789abcdefABCDEF),
47 which must have a length that is a multiple of 16,
48 encrypts it using the DES key derived from
52 and outputs the result again in
55 .\" (over the alphabet 0123456789abcdef)
60 function performs the converse operation.
66 return 1 on success and 0 on error.
68 These functions are available in glibc since version 2.1.
70 The prototypes are missing from the abovementioned include file.