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
14namespace Botan {
15
16/**
17* KDF2, from IEEE 1363
18*/
19class 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
std::string name() const
Definition kdf2.h:25
~KDF2()
Definition kdf2.h:30
SecureVector< byte > derive(size_t, const byte[], size_t, const byte[], size_t) const
Definition kdf2.cpp:15
KDF * clone() const
Definition kdf2.h:26
KDF2(HashFunction *h)
Definition kdf2.h:28
KDF2(const KDF2 &other)
Definition kdf2.h:29