diff options
Diffstat (limited to 'src/kdf/kdf.h')
-rw-r--r-- | src/kdf/kdf.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/kdf/kdf.h b/src/kdf/kdf.h index aa6cd94cd..70f636b6c 100644 --- a/src/kdf/kdf.h +++ b/src/kdf/kdf.h @@ -19,17 +19,23 @@ namespace Botan { class BOTAN_DLL KDF { public: - SecureVector<byte> derive_key(u32bit, const MemoryRegion<byte>&, - const std::string& = "") const; - SecureVector<byte> derive_key(u32bit, const MemoryRegion<byte>&, - const MemoryRegion<byte>&) const; - SecureVector<byte> derive_key(u32bit, const MemoryRegion<byte>&, - const byte[], u32bit) const; - - SecureVector<byte> derive_key(u32bit, const byte[], u32bit, - const std::string& = "") const; - SecureVector<byte> derive_key(u32bit, const byte[], u32bit, - const byte[], u32bit) const; + SecureVector<byte> derive_key(u32bit key_len, + const MemoryRegion<byte>& secret, + const std::string& salt = "") const; + SecureVector<byte> derive_key(u32bit key_len, + const MemoryRegion<byte>& secret, + const MemoryRegion<byte>& salt) const; + + SecureVector<byte> derive_key(u32bit key_len, + const MemoryRegion<byte>& secret, + const byte salt[], u32bit salt_len) const; + + SecureVector<byte> derive_key(u32bit key_len, + const byte secret[], u32bit secret_len, + const std::string& salt = "") const; + SecureVector<byte> derive_key(u32bit key_len, + const byte secret[], u32bit secret_len, + const byte salt[], u32bit salt_len) const; virtual ~KDF() {} private: @@ -43,7 +49,9 @@ class BOTAN_DLL KDF class BOTAN_DLL MGF { public: - virtual void mask(const byte[], u32bit, byte[], u32bit) const = 0; + virtual void mask(const byte in[], u32bit in_len, + byte out[], u32bit out_len) const = 0; + virtual ~MGF() {} }; |