From Nokia Developer Wiki
Created:(20 Sep 2007)
Last edited:(27 Jul 2012)
libcrypt is used for encrypting/decrypting of messages,passwords and blocks of data.
The main cryptographic functions in this lib are:
- An utility which adds, updates, dumps, or flushes Security Association Database (SAD) entries as well as Security Policy Database (SPD) entries in the kernel.
- encrypt() function encrypts and decrypts64-bit messages. The algorithm used to perform encryption/decryption is Data Encryption Standard (DES).
- The encrypt and setkey functions do not return any value.
- setkey() is invoked to set the key for the DES machine.
- If encrypt is called without priorly invoking setkey the implementation assumes a bit vector consisting of all zeroes as the key for the DES algorithm.
void encrypt (char datablock, int flag);
void setkey (const char *key);
- The crypt function performs password hashing.
- The crypt function returns a pointer to the encrypted value on success, and NULL on failure.
- Currently the implementation supports Data Encryption Standard (DES) and MD5 hash algorithms
char * crypt (const char *key, const char *salt);