Botan: src/kdf/kdf2/kdf2.h Source File

Botan 1.10.17

kdf2.h
Go to the documentation of this file.
1 /*
2 * KDF2
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_KDF2_H__
9 #define BOTAN_KDF2_H__
10
11 #include <botan/kdf.h>
12 #include <botan/hash.h>
13
14 namespace Botan {
15
16 /**
17 * KDF2, from IEEE 1363
18 */
19 class BOTAN_DLL KDF2 : public KDF
20 {
21 public:
22 SecureVector<byte> derive(size_t, const byte[], size_t,
23 const byte[], size_t) const;
24
25 std::string name() const { return "KDF2(" + hash->name() + ")"; }
26 KDF* clone() const { return new KDF2(hash->clone()); }
27
28 KDF2(HashFunction* h) : hash(h) {}
29 KDF2(const KDF2& other) : KDF(), hash(other.hash->clone()) {}
30 ~KDF2() { delete hash; }
31 private:
32 HashFunction* hash;
33 };
34
35 }
36
37 #endif
Botan::KDF2::KDF2
KDF2(const KDF2 &other)
Definition: kdf2.h:29
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::KDF2::name
std::string name() const
Definition: kdf2.h:25
Botan
Definition: algo_base.h:14
Botan::HashFunction
Definition: hash.h:20
Botan::KDF
Definition: kdf.h:20
Botan::KDF2::~KDF2
~KDF2()
Definition: kdf2.h:30
Botan::KDF2::clone
KDF * clone() const
Definition: kdf2.h:26
Botan::KDF2::KDF2
KDF2(HashFunction *h)
Definition: kdf2.h:28
Botan::SecureVector< byte >
Botan::KDF2
Definition: kdf2.h:19