Generate an encryption key from a password
#include <fs_crypto_api.h>
#include <sys/fs_crypto.h>
int fs_crypto_key_gen( const char *password,
int plen,
const uint8_t *salt,
int slen,
uint8_t *key,
int klen );
The fs_crypto_key_gen() function generates an encryption key from a secret password and public salt data. It uses a private implementation of the PKCS #5 PBKDF2 algorithm; you can use a different implementation if your system needs greater security.
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |