Botan  1.11.34
Crypto and TLS for C++11
prf_x942.h
Go to the documentation of this file.
1 /*
2 * X9.42 PRF
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7 
8 #ifndef BOTAN_ANSI_X942_PRF_H__
9 #define BOTAN_ANSI_X942_PRF_H__
10 
11 #include <botan/kdf.h>
12 
13 namespace Botan {
14 
15 /**
16 * PRF from ANSI X9.42
17 */
18 class BOTAN_DLL X942_PRF final : public KDF
19  {
20  public:
21  std::string name() const override { return "X9.42-PRF(" + m_key_wrap_oid + ")"; }
22 
23  KDF* clone() const override { return new X942_PRF(m_key_wrap_oid); }
24 
25  size_t kdf(byte key[], size_t key_len,
26  const byte secret[], size_t secret_len,
27  const byte salt[], size_t salt_len,
28  const byte label[], size_t label_len) const override;
29 
30  explicit X942_PRF(const std::string& oid);
31  private:
32  std::string m_key_wrap_oid;
33  };
34 
35 }
36 
37 #endif
std::string name() const override
Definition: prf_x942.h:21
Definition: alg_id.cpp:13
Definition: kdf.h:20
KDF * clone() const override
Definition: prf_x942.h:23
std::uint8_t byte
Definition: types.h:31