1XCRYPT(3)                  Linux Programmer's Manual                 XCRYPT(3)
2
3
4

NAME

6       xencrypt, xdecrypt, passwd2des - RFS password encryption
7

SYNOPSIS

9       #include <rpc/des_crypt.h>
10
11       void passwd2des(char *passwd, char *key);
12
13       int xencrypt(char *secret, char *passwd);
14
15       int xdecrypt(char *secret, char *passwd);
16

DESCRIPTION

18       The  function passwd2des() takes a character string passwd of arbitrary
19       length and fills a character array key of length 8.  The array  key  is
20       suitable  for  use  as DES key.  It has odd parity set in bit 0 of each
21       byte.  Both other functions described here use this  function  to  turn
22       their argument passwd into a DES key.
23
24       The  xencrypt()  function takes the ASCII character string secret given
25       in hex, which must have a length that is a multiple of 16, encrypts  it
26       using  the DES key derived from passwd by passwd2des(), and outputs the
27       result again in secret as a hex string of the same length.
28
29       The xdecrypt() function performs the converse operation.
30

RETURN VALUE

32       The functions xencrypt() and xdecrypt() return 1 on success  and  0  on
33       error.
34

VERSIONS

36       These functions are available in glibc since version 2.1.
37

ATTRIBUTES

39       For   an   explanation   of   the  terms  used  in  this  section,  see
40       attributes(7).
41
42       ┌──────────────────────────────────────┬───────────────┬─────────┐
43Interface                             Attribute     Value   
44       ├──────────────────────────────────────┼───────────────┼─────────┤
45passwd2des(), xencrypt(), xdecrypt()  │ Thread safety │ MT-Safe │
46       └──────────────────────────────────────┴───────────────┴─────────┘
47

BUGS

49       The prototypes are missing from the abovementioned include file.
50

SEE ALSO

52       cbc_crypt(3)
53

COLOPHON

55       This page is part of release 4.16 of the Linux  man-pages  project.   A
56       description  of  the project, information about reporting bugs, and the
57       latest    version    of    this    page,    can     be     found     at
58       https://www.kernel.org/doc/man-pages/.
59
60
61
62                                  2017-09-15                         XCRYPT(3)
Impressum