blob: df84a1a0018d75fada07525e07515e55d17a3f06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*
* KDF1
* (C) 1999-2007 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/internal/kdf_utils.h>
#include <botan/kdf1.h>
namespace Botan {
BOTAN_REGISTER_KDF_1HASH(KDF1, "KDF1");
/*
* KDF1 Key Derivation Mechanism
*/
secure_vector<byte> KDF1::derive(size_t,
const byte secret[], size_t secret_len,
const byte P[], size_t P_len) const
{
hash->update(secret, secret_len);
hash->update(P, P_len);
return hash->final();
}
}
|