Manpage of XCRYPT

XCRYPT

Section: Linux Programmer's Manual (3)
Updated: 2015-07-23
Index
 

NAME

xencrypt, xdecrypt, passwd2des - RFS password encryption  

SYNOPSIS

#include <rpc/des_crypt.h>

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

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

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

DESCRIPTION

The function passwd2des() takes a character string passwdof arbitrary length and fills a character array keyof length 8. The array keyis suitable for use as DES key. It has odd parity set in bit 0 of each byte. Both other functions described here use this function to turn their argument passwdinto a DES key.

The xencrypt() function takes the ASCII character string secretgiven in hex, which must have a length that is a multiple of 16, encrypts it using the DES key derived from passwdby passwd2des(), and outputs the result again in secretas a hex string 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.  

VERSIONS

These functions are available in glibc since version 2.1.  

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).
InterfaceAttributeValue
passwd2des(), xencrypt(), xdecrypt() Thread safetyMT-Safe

 

BUGS

The prototypes are missing from the abovementioned include file.  

SEE ALSO

cbc_crypt(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
VERSIONS
ATTRIBUTES
BUGS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 16:30:16 GMT, October 09, 2016 Click Here!