Botan 1.10.17

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 */
15 SecureVector<byte> KDF1::derive(size_t,
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 }
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::KDF1::derive
SecureVector< byte > derive(size_t, const byte secret[], size_t secret_len, const byte P[], size_t P_len) const
Definition: kdf1.cpp:15
Botan::Buffered_Computation::update
void update(const byte in[], size_t length)
Definition: buf_comp.h:33
Botan
Definition: algo_base.h:14
Botan::Buffered_Computation::final
void final(byte out[])
Definition: buf_comp.h:80
Botan::SecureVector< byte >