Seth Woolley's Man Viewer

xcrypt(3) - passwd2des, xdecrypt, xencrypt, passwd2des, xdecrypt, xencrypt - RFS password encryption - man 3 xcrypt

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

xcrypt(3)                      RPC cryptography                      xcrypt(3)



NAME
       xencrypt, xdecrypt, passwd2des - RFS password encryption

SYNOPSIS
       #include <rpc(3,5,8)/des_crypt.h>

       void passwd2des (char *passwd(1,5), char *key);

       int xencrypt (char *secret, char *passwd(1,5));

       int xdecrypt (char *secret, char *passwd(1,5));


DESCRIPTION
       The  function passwd2des() takes a character string(3,n) passwd(1,5) of arbitrary
       length and fills a character array key of length 8. The  array  key  is
       suitable  for  use  as  DES key. It has odd parity set(7,n,1 builtins) in(1,8) bit 0 of each
       byte.  Both other functions described here use this  function  to  turn
       their argument passwd(1,5) into a DES key.

       The  xencrypt()  function takes the ASCII character string(3,n) secret given
       in(1,8) hex, which must have a length that is a multiple of 16, encrypts  it
       using  the DES key derived from passwd(1,5) by passwd2des(), and outputs the
       result again in(1,8) secret as a hex string(3,n) of the same length.

       The xdecrypt() function performs the converse operation.

RETURN VALUE
       The functions xencrypt() and xdecrypt() return 1 on success  and  0  on
       error.

AVAILABILITY
       These  routines  are present in(1,8) libc 4.6.27 and later, and in(1,8) glibc 2.1
       and later.

BUGS
       The prototypes are missing from the abovementioned include file.

SEE ALSO
       cbc_crypt(3)



                                  2003-04-04                         xcrypt(3)

References for this manual (incoming links)