summaryrefslogtreecommitdiff
path: root/pbkdf2.h
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2012-09-21 08:10:50 +0200
committerNiels Möller <nisse@lysator.liu.se>2012-09-21 08:10:50 +0200
commit90320ba2a897ffa2d3e43baee3b3972f0cb85421 (patch)
tree6067341f7b4d33134a0d25958992d22ebbde684c /pbkdf2.h
parentd5a173c74fcaa3d9380c22c71d3817bb48d78f3a (diff)
downloadnettle-90320ba2a897ffa2d3e43baee3b3972f0cb85421.tar.gz
Implement concrete PBKDF2 functions.
Diffstat (limited to 'pbkdf2.h')
-rw-r--r--pbkdf2.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/pbkdf2.h b/pbkdf2.h
index aa615676..bf152544 100644
--- a/pbkdf2.h
+++ b/pbkdf2.h
@@ -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