Sponsored Content
Full Discussion: crypt utility
Operating Systems Linux Red Hat crypt utility Post 302572722 by fpmurphy on Thursday 10th of November 2011 07:48:43 PM
Old 11-10-2011
Are you talking about a shell script or a program written in C? In your first post you talk about a crypt utility; in the previous post you talk about an encrypt function.

If you are talking about an equivalent to the HP-UX crypt utility on RHEL, check out the mcrypt utility. The manpage for mcrypt is readily available on the Internet.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

crypt question

Hi, does anyone know if the output from crypt can include control caracters or only ascii caracters ? I want to mail a crypt encoded file and i want to know if i have to uuencode the file first or not . thx for help (2 Replies)
Discussion started by: Sven28
2 Replies

2. Programming

Crypt How to??

How to use the crypt function in c++.Itgives error as "Undefined reference to crypt".help me soon plzzzzzzzzz... (1 Reply)
Discussion started by: dhanas
1 Replies

3. UNIX for Advanced & Expert Users

What commands can be used to replace crypt???

crypt is a command that is used to add more security to files. now, this crypt command is used on systems (i dont know which) other that Linux RedHat now, my question is that is there a command in Linux Red Hat similar to the crypt command??? i really want to have the files on my system... (2 Replies)
Discussion started by: TRUEST
2 Replies

4. UNIX for Dummies Questions & Answers

Need to de-crypt a file..

Hi.. I need to decrypt a file in Solaris. I'm giving command as crypt decrypt_key filename.locked filename.unlocked where decrypt_key is the key key for decrypting the file. filename.locked is the file thats encrypted and I need to de-crypt filename.unlocked is the new file that I need ... (1 Reply)
Discussion started by: livetaurean19
1 Replies

5. AIX

I need to do crypt(as in HP-UX) in AIX 5

Hi, I will crypt a file, which requires password to open it in HP-UX. Please let me know the equivalent command in AIX 5. Your co-operation is highly appreciated in this regard! -Thiagu (1 Reply)
Discussion started by: thiagoo
1 Replies

6. UNIX for Advanced & Expert Users

HP-UX crypt, need to do in AIX 5

Hi, I will crypt a file, which requires password to open it in HP-UX. Please let me know the equivalent command in AIX 5. Your co-operation is highly appreciated in this regard! -Thiagu (2 Replies)
Discussion started by: thiagoo
2 Replies

7. AIX

Crypt command

Will AIX support crypt command or elase is there any command which is similar to crypt on AIX? (2 Replies)
Discussion started by: kalpana.anuga
2 Replies

8. Shell Programming and Scripting

Crypt command

Hi all, I want the source code similar to crypt command in unix. Thanks for the reply (4 Replies)
Discussion started by: ratna
4 Replies

9. UNIX for Dummies Questions & Answers

I need help with Crypt()

Hi, Completely new to Unix - trying to decrypt a Crypt() password, I'm looking for a DES based software that can run on windows...anyone know of a link / online tool that can help me? Much appreciated reppir (0 Replies)
Discussion started by: reppir
0 Replies

10. Solaris

ZFS CRYPT

Hi! I'm a new user... I'm looking for some informations about the ZDF file sytem... In my ubuntu box i have installed cryptkeeper, and i want to know if in Solaris 11 Express can find something similar... (3 Replies)
Discussion started by: Solarisutente
3 Replies
crypt(3EXT)						    Extended Library Functions						       crypt(3EXT)

NAME
crypt, setkey, encrypt, des_crypt, des_setkey, des_encrypt, run_setkey, run_crypt, crypt_close - password and file encryption functions SYNOPSIS
cc [ flag ... ] file ... -lcrypt [ library ... ] #include <crypt.h> char *crypt(const char *key, const char *salt); void setkey(const char *key); void encrypt(char *block, int flag); char *des_crypt(const char *key, const char *salt); void des_setkey(const char *key); void des_encrypt(char *block, int flag); int run_setkey(int *p, const char *key); int run_crypt(long offset, char *buffer, unsigned int count, int *p); int crypt_close(int *p); DESCRIPTION
des_crypt() is the password encryption function. It is based on a one-way hashing encryption algorithm with variations intended (among other things) to frustrate use of hardware implementations of a key search. key is a user's typed password. salt is a two-character string chosen from the set [a-zA-Z0-9./]; this string is used to perturb the hash- ing algorithm in one of 4096 different ways, after which the password is used as the key to encrypt repeatedly a constant string. The returned value points to the encrypted password. The first two characters are the salt itself. The des_setkey() and des_encrypt() entries provide (rather primitive) access to the actual hashing algorithm. The argument of des_setkey() is a character array of length 64 containing only the characters with numerical value 0 and 1. If this string is divided into groups of 8, the low-order bit in each group is ignored, thereby creating a 56-bit key that is set into the machine. This key is the key that will be used with the hashing algorithm to encrypt the string block with the function des_encrypt(). The argument to the des_encrypt() entry is a character array of length 64 containing only the characters with numerical value 0 and 1. The argument array is modified in place to a similar array representing the bits of the argument after having been subjected to the hashing algorithm using the key set by des_setkey(). If flag is zero, the argument is encrypted; if non-zero, it is decrypted. Note that decryption is not provided in the international version of crypt(). The international version is part of the C Development Set, and the domestic version is part of the Security Administration Utilities. If decryption is attempted with the international version of des_encrypt(), an error message is printed. crypt(), setkey(), and encrypt() are front-end routines that invoke des_crypt(), des_setkey(), and des_encrypt() respectively. The routines run_setkey() and run_crypt() are designed for use by applications that need cryptographic capabilities, such as ed(1) and vi(1). run_setkey() establishes a two-way pipe connection with the crypt utility, using key as the password argument. run_crypt() takes a block of characters and transforms the cleartext or ciphertext into their ciphertext or cleartext using the crypt utility. offset is the relative byte position from the beginning of the file that the block of text provided in block is coming from. count is the number of char- acters in block, and connection is an array containing indices to a table of input and output file streams. When encryption is finished, crypt_close() is used to terminate the connection with the crypt utility. run_setkey() returns -1 if a connection with the crypt utility cannot be established. This result will occur in international versions of the UNIX system in which the crypt utility is not available. If a null key is passed to run_setkey(), 0 is returned. Otherwise, 1 is returned. run_crypt() returns -1 if it cannot write output or read input from the pipe attached to crypt(). Otherwise it returns 0. The program must be linked with the object file access routine library libcrypt.a. RETURN VALUES
In the international version of crypt(), a flag argument of 1 to encrypt() or des_encrypt() is not accepted, and errno is set to ENOSYS to indicate that the functionality is not available. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
ed(1), login(1), passwd(1), vi(1), getpass(3C), passwd(4), attributes(5) NOTES
The return value in crypt() points to static data that are overwritten by each call. SunOS 5.11 3 Mar 2008 crypt(3EXT)
All times are GMT -4. The time now is 09:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy