diff options
author | Simon Josefsson <simon@josefsson.org> | 2012-09-21 08:10:50 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2012-09-21 08:10:50 +0200 |
commit | 90320ba2a897ffa2d3e43baee3b3972f0cb85421 (patch) | |
tree | 6067341f7b4d33134a0d25958992d22ebbde684c /pbkdf2.h | |
parent | d5a173c74fcaa3d9380c22c71d3817bb48d78f3a (diff) | |
download | nettle-90320ba2a897ffa2d3e43baee3b3972f0cb85421.tar.gz |
Implement concrete PBKDF2 functions.
Diffstat (limited to 'pbkdf2.h')
-rw-r--r-- | pbkdf2.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -35,6 +35,8 @@ extern "C" /* Namespace mangling */ #define pbkdf2 nettle_pbkdf2 +#define pbkdf2_hmac_sha1 nettle_pbkdf2_hmac_sha1 +#define pbkdf2_hmac_sha256 nettle_pbkdf2_hmac_sha256 void pbkdf2 (void *mac_ctx, @@ -54,6 +56,20 @@ pbkdf2 (void *mac_ctx, (digest_size), (iterations), \ (salt_length), (salt), (length), (dst))) +/* PBKDF2 with specific PRFs. */ + +void +pbkdf2_hmac_sha1 (unsigned key_length, const uint8_t *key, + unsigned iterations, + unsigned salt_length, const uint8_t *salt, + unsigned length, uint8_t *dst); + +void +pbkdf2_hmac_sha256 (unsigned key_length, const uint8_t *key, + unsigned iterations, + unsigned salt_length, const uint8_t *salt, + unsigned length, uint8_t *dst); + #ifdef __cplusplus } #endif |