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 2021-03-22 "" "Linux Programmer's Manual"
15 xencrypt, xdecrypt, passwd2des \- RFS password encryption
18 .B "#include <rpc/des_crypt.h>"
20 .BI "void passwd2des(char " *passwd ", char *" key ");"
22 .BI "int xencrypt(char *" secret ", char *" passwd ");"
23 .BI "int xdecrypt(char *" secret ", char *" passwd ");"
27 Do not use these functions in new code.
28 They do not achieve any type of acceptable cryptographic security guarantees.
32 takes a character string
34 of arbitrary length and fills a character array
39 is suitable for use as DES key.
40 It has odd parity set in bit 0 of each byte.
41 Both other functions described here use this function to turn their
48 function takes the ASCII character string
51 .\" (over the alphabet 0123456789abcdefABCDEF),
52 which must have a length that is a multiple of 16,
53 encrypts it using the DES key derived from
57 and outputs the result again in
60 .\" (over the alphabet 0123456789abcdef)
65 function performs the converse operation.
71 return 1 on success and 0 on error.
73 These functions are available in glibc since version 2.1.
75 For an explanation of the terms used in this section, see
83 Interface Attribute Value
88 T} Thread safety MT-Safe
94 The prototypes are missing from the abovementioned include file.