util.c File Reference
Generic utilities. More...
Go to the source code of this file.
Functions | |
| void | password2key (const char *pwd, size_t pwd_len, uint8_t *key, size_t key_len) |
| Convert a generic "password" (low-diffused) to a generic "key" (high-diffused). | |
Detailed Description
Generic utilities.
Definition in file util.c.
Function Documentation
| void password2key | ( | const char * | pwd, |
| size_t | pwd_len, | ||
| uint8_t * | key, | ||
| size_t | key_len | ||
| ) |
Convert a generic "password" (low-diffused) to a generic "key" (high-diffused).
In common terminology, a "password" is a key with weak cryptographic characteristics, such as commonly used password input by an user, which are usually short and use only a few different characters from the 0-255 byte range.
This function derives a strong key from the password using a one-way process.
- Note:
- Uses PBKDF2 as key-derivation function, with a fixed salt that changes for each Bertos project.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/bertos_logo.png)