diff options
author | lloyd <[email protected]> | 2015-02-18 04:21:21 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2015-02-18 04:21:21 +0000 |
commit | 88285f51ba4fd5bc1a1cc06b0760b3926046f29b (patch) | |
tree | 7443b2b266b8445433b9c63704b7a09e216282f2 /src/lib/kdf/kdf2/kdf2.h | |
parent | aced9e88d970546c6324e768ce11b0a483bd3bd0 (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/kdf/kdf2/kdf2.h')
-rw-r--r-- | src/lib/kdf/kdf2/kdf2.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/kdf/kdf2/kdf2.h b/src/lib/kdf/kdf2/kdf2.h index c574336b6..e8a8be1fa 100644 --- a/src/lib/kdf/kdf2/kdf2.h +++ b/src/lib/kdf/kdf2/kdf2.h @@ -19,15 +19,17 @@ namespace Botan { class BOTAN_DLL KDF2 : public KDF { public: - secure_vector<byte> derive(size_t, const byte[], size_t, - const byte[], size_t) const; + std::string name() const override { return "KDF2(" + m_hash->name() + ")"; } - std::string name() const { return "KDF2(" + hash->name() + ")"; } - KDF* clone() const { return new KDF2(hash->clone()); } + KDF* clone() const override { return new KDF2(m_hash->clone()); } - KDF2(HashFunction* h) : hash(h) {} + size_t kdf(byte key[], size_t key_len, + const byte secret[], size_t secret_len, + const byte salt[], size_t salt_len) const override; + + KDF2(HashFunction* h) : m_hash(h) {} private: - std::unique_ptr<HashFunction> hash; + std::unique_ptr<HashFunction> m_hash; }; } |