Botan  1.10.12
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
KDF2(const KDF2 &other)
Definition: kdf2.h:29
std::string name() const
Definition: kdf2.h:25
unsigned char byte
Definition: types.h:22
macro_name HP_ACC binary_name aCC compile_option c output_to_option o add_include_dir_option I add_lib_dir_option L add_lib_option l lib_opt_flags O2 check_opt_flags O2 debug_flags g no_debug_flags lang_flags AA ext eh z warning_flags shared_flags Z makefile_style unix< mach_abi_linking > hppa1 DAportable hppa1 DA1 hppa2 DA2</mach_abi_linking >< so_link_flags > h
Definition: hpcc.txt:28
Definition: kdf.h:20
~KDF2()
Definition: kdf2.h:30
KDF * clone() const
Definition: kdf2.h:26
KDF2(HashFunction *h)
Definition: kdf2.h:28