2 .\" Copyright 2003 walter harms (walter.harms@informatik.uni-oldenburg.de)
4 .\" SPDX-License-Identifier: GPL-1.0-or-later
6 .\" this is the 3rd type of interface for cryptographic routines
7 .\" 1. encrypt() expects a bit field
8 .\" 2. cbc_crypt() byte values
9 .\" 3. xencrypt() a hexstring
10 .\" to bad to be true :(
12 .TH XCRYPT 3 (date) "Linux man-pages (unreleased)"
14 xencrypt, xdecrypt, passwd2des \- RFS password encryption
17 .RI ( libc ", " \-lc )
20 .B "#include <rpc/des_crypt.h>"
22 .BI "void passwd2des(char " *passwd ", char *" key ");"
24 .BI "int xencrypt(char *" secret ", char *" passwd ");"
25 .BI "int xdecrypt(char *" secret ", char *" passwd ");"
29 Do not use these functions in new code.
30 They do not achieve any type of acceptable cryptographic security guarantees.
34 takes a character string
36 of arbitrary length and fills a character array
41 is suitable for use as DES key.
42 It has odd parity set in bit 0 of each byte.
43 Both other functions described here use this function to turn their
50 function takes the ASCII character string
53 .\" (over the alphabet 0123456789abcdefABCDEF),
54 which must have a length that is a multiple of 16,
55 encrypts it using the DES key derived from
59 and outputs the result again in
62 .\" (over the alphabet 0123456789abcdef)
67 function performs the converse operation.
73 return 1 on success and 0 on error.
75 These functions are available since glibc 2.1.
77 For an explanation of the terms used in this section, see
85 Interface Attribute Value
90 T} Thread safety MT-Safe
96 The prototypes are missing from the abovementioned include file.