Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xcrypt(3) [debian man page]

XCRYPT(3)						     Linux Programmer's Manual							 XCRYPT(3)

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 passwd 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 in bit 0 of each byte. Both other functions described here use this function to turn their argument passwd into a DES key. The xencrypt() function takes the ASCII character string secret given in hex, which must have a length that is a multiple of 16, encrypts it using the DES key derived from passwd by passwd2des(), and outputs the result again in secret as 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 routines are present in libc 4.6.27 and later, and in glibc 2.1 and later. BUGS
The prototypes are missing from the abovementioned include file. SEE ALSO
cbc_crypt(3) COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2003-04-04 XCRYPT(3)

Check Out this Related Man Page

XCRYPT(3)						     Linux Programmer's Manual							 XCRYPT(3)

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 passwd 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 in bit 0 of each byte. Both other functions described here use this function to turn their argument passwd into a DES key. The xencrypt() function takes the ASCII character string secret given in hex, which must have a length that is a multiple of 16, encrypts it using the DES key derived from passwd by passwd2des(), and outputs the result again in secret as 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 routines are present in libc 4.6.27 and later, and in glibc 2.1 and later. BUGS
The prototypes are missing from the abovementioned include file. SEE ALSO
cbc_crypt(3) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2003-04-04 XCRYPT(3)
Man Page

6 More Discussions You Might Find Interesting

1. Red Hat

restrict access of a user to two directories only

Hi all, I am using RHEL 5.0 I need a user say test to have full access to two directories, say /tmp1 & /tmp2 only other than his home directory. I do not want to change his login shell which is ksh or bash by default. Moreover, he should not even have read access of other directories. ... (10 Replies)
Discussion started by: vikas027
10 Replies

2. UNIX for Dummies Questions & Answers

Shadow file encryption method

Hi all, I'd like to use the encryption method used to generate the /etc/shadow passwords. The goal is to write a script that get a plain-text password as argument and returns an encrycped one. Can you help me, please? (10 Replies)
Discussion started by: nisant
10 Replies

3. Programming

AES encryption

Hi, Any body can please point me to source code for implementing AES encryption in CTR mode i.e RFC 3686 (AES-CTR).I did googling but no good results. (6 Replies)
Discussion started by: Raom
6 Replies

4. UNIX for Advanced & Expert Users

password hashing algorithms

I'm collecting some info on the password hashing algorithms in use on various Unix systems. So far I have: no $ legacy unix crypt $1$ MD5 $2$ Blowfish on BSD $2a$ alternate Blowfish on BSD $md5$ Sun's alternate MD5 $3$ a Microsoft hash $4$ not used? $5$ RedHat proposed Sha-256... (2 Replies)
Discussion started by: Perderabo
2 Replies

5. Shell Programming and Scripting

Get the distinct of a particular field

From the below ps output , I want the distinct values of the third field (ie. I need the distinct PPIDs) $ ps -ef UID PID PPID C STIME TTY TIME CMD root 1 0 0 Nov 10 - 48:49 /etc/init root 1769576 1 0 Nov 10 - 0:07... (1 Reply)
Discussion started by: polavan
1 Replies

6. Programming

I can't compile (gcc) in Solaris 11.3 non global zone

I can't compile anything, the final make error says "Command failed for target `install-recursive'", but I am not able to identify the root cause of that error, I tried with cc, gcc 4.5, also gcc 5.2, using make, using gmake 3.82, ld 5.11, gld 2.31... and I am totally stuck yet... please help, to... (4 Replies)
Discussion started by: sugar222
4 Replies