SYNOPSIS
#include <crypt.h>
char *crypt(const char *key, const char *salt);
void encrypt(char *block, int edflag);
void setkey(const char *key);
char *crypt_r(const char *key, const char *salt);
void encrypt_r(char *block, int edflag);
void setkey_r(const char *key);
DESCRIPTION
The
The
The
The
PARAMETERS
- block
-
Points to a string to be encrypted (or decrypted) by
encrypt() . This string is a 64 byte array of zeroes and ones,- Note:
-
This string is encrypted (or decrypted) in place. Thus, when
encrypt() is finished, block points to the encrypted (or decrypted) string.
- edflag
-
determines whether the
encrypt() function is to perform encryption or decryption. When edflag is 1, decryption is performed. When edflag is 0, encryption is performed. - key
-
For
crypt() , points to the string to be encoded.For
setkey() , it points to a 64 byte array of zeroes and ones. When the string is divided into groups of eights (creating the equivalent of a 8-bit byte), the low order bit in each group is ignored, leaving a 56-bit key to be used byencrypt() . - salt
-
Points to a string used by
crypt() to perturb its encryption algorithm. This string may only contain uppercase and lowercase letters, digits, periods (.), and slashes (/). Only the first two characters of this string are used.
RETURN VALUES
The
If successful,
When
CONFORMANCE
UNIX 98.
MULTITHREAD SAFETY LEVEL
Unsafe.
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
_NutValidatePassword()
PTC MKS Toolkit 10.5 Documentation Build 40.