Botan  1.11.11
kdf1.cpp
Go to the documentation of this file.
1 /*
2 * KDF1
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7 
8 #include <botan/kdf1.h>
9 
10 namespace Botan {
11 
12 /*
13 * KDF1 Key Derivation Mechanism
14 */
16  const byte secret[], size_t secret_len,
17  const byte P[], size_t P_len) const
18  {
19  hash->update(secret, secret_len);
20  hash->update(P, P_len);
21  return hash->final();
22  }
23 
24 }
std::vector< T, secure_allocator< T >> secure_vector
Definition: secmem.h:92
uint8_t byte
Definition: types.h:30
Definition: buf_comp.h:15
secure_vector< byte > derive(size_t, const byte secret[], size_t secret_len, const byte P[], size_t P_len) const
Definition: kdf1.cpp:15