Botan
1.10.17
src
kdf
kdf2
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::HashFunction
Definition
hash.h:22
Botan::KDF2::name
std::string name() const
Definition
kdf2.h:25
Botan::KDF2::~KDF2
~KDF2()
Definition
kdf2.h:30
Botan::KDF2::derive
SecureVector< byte > derive(size_t, const byte[], size_t, const byte[], size_t) const
Definition
kdf2.cpp:15
Botan::KDF2::clone
KDF * clone() const
Definition
kdf2.h:26
Botan::KDF2::KDF2
KDF2(HashFunction *h)
Definition
kdf2.h:28
Botan::KDF2::KDF2
KDF2(const KDF2 &other)
Definition
kdf2.h:29
Botan::KDF
Definition
kdf.h:21
Botan::SecureVector
Definition
secmem.h:329
Botan
Definition
algo_base.h:14
Generated by
1.18.0