aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pbkdf/pbkdf2/pbkdf2.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-02-18 04:21:21 +0000
committerlloyd <[email protected]>2015-02-18 04:21:21 +0000
commit88285f51ba4fd5bc1a1cc06b0760b3926046f29b (patch)
tree7443b2b266b8445433b9c63704b7a09e216282f2 /src/lib/pbkdf/pbkdf2/pbkdf2.h
parentaced9e88d970546c6324e768ce11b0a483bd3bd0 (diff)
Modify interfaces of KDF and PBKDF to write output to an array, with
higher level functions on interface handling returning a vector.
Diffstat (limited to 'src/lib/pbkdf/pbkdf2/pbkdf2.h')
-rw-r--r--src/lib/pbkdf/pbkdf2/pbkdf2.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/lib/pbkdf/pbkdf2/pbkdf2.h b/src/lib/pbkdf/pbkdf2/pbkdf2.h
index 3d1a14fab..d74410b89 100644
--- a/src/lib/pbkdf/pbkdf2/pbkdf2.h
+++ b/src/lib/pbkdf/pbkdf2/pbkdf2.h
@@ -14,6 +14,14 @@
namespace Botan {
+BOTAN_DLL size_t pbkdf2(MessageAuthenticationCode& prf,
+ byte out[],
+ size_t out_len,
+ const std::string& passphrase,
+ const byte salt[], size_t salt_len,
+ size_t iterations,
+ std::chrono::milliseconds msec);
+
/**
* PKCS #5 PBKDF2
*/
@@ -30,12 +38,11 @@ class BOTAN_DLL PKCS5_PBKDF2 : public PBKDF
return new PKCS5_PBKDF2(mac->clone());
}
- std::pair<size_t, OctetString>
- key_derivation(size_t output_len,
- const std::string& passphrase,
- const byte salt[], size_t salt_len,
- size_t iterations,
- std::chrono::milliseconds msec) const override;
+ size_t pbkdf(byte output_buf[], size_t output_len,
+ const std::string& passphrase,
+ const byte salt[], size_t salt_len,
+ size_t iterations,
+ std::chrono::milliseconds msec) const override;
/**
* Create a PKCS #5 instance using the specified message auth code