diff options
author | lloyd <[email protected]> | 2008-10-26 02:30:08 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-26 02:30:08 +0000 |
commit | b1344477a80c7410da9ce05dd3343c04d24f8095 (patch) | |
tree | d80ee5b56b8803359a22bdb66cb7b4c630baa5de /src/kdf/kdf.h | |
parent | ec95d5187cc714448f29c4c90cce6bc9fcc9ea21 (diff) |
Move kdf/kdf_base to kdf
Diffstat (limited to 'src/kdf/kdf.h')
-rw-r--r-- | src/kdf/kdf.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/kdf/kdf.h b/src/kdf/kdf.h new file mode 100644 index 000000000..7d0c1866b --- /dev/null +++ b/src/kdf/kdf.h @@ -0,0 +1,50 @@ +/************************************************* +* KDF/MGF Header File * +* (C) 1999-2007 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_KDF_BASE_H__ +#define BOTAN_KDF_BASE_H__ + +#include <botan/secmem.h> +#include <botan/types.h> + +namespace Botan { + +/************************************************* +* Key Derivation Function * +*************************************************/ +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; + + virtual ~KDF() {} + private: + virtual SecureVector<byte> derive(u32bit, const byte[], u32bit, + const byte[], u32bit) const = 0; + }; + +/************************************************* +* Mask Generation Function * +*************************************************/ +class BOTAN_DLL MGF + { + public: + virtual void mask(const byte[], u32bit, byte[], u32bit) const = 0; + virtual ~MGF() {} + }; + +} + +#endif |