Botan
3.6.1
Crypto and TLS for C&
src
lib
kdf
prf_x942
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/asn1_obj.h>
12
#include <botan/kdf.h>
13
14
namespace
Botan
{
15
16
/**
17
* PRF from ANSI X9.42
18
*/
19
class
X942_PRF
final
:
public
KDF
{
20
public
:
21
std::string
name
()
const override
;
22
23
std::unique_ptr<KDF>
new_object
()
const override
{
return
std::make_unique<X942_PRF>(m_key_wrap_oid); }
24
25
void
kdf
(uint8_t key[],
26
size_t
key_len,
27
const
uint8_t secret[],
28
size_t
secret_len,
29
const
uint8_t salt[],
30
size_t
salt_len,
31
const
uint8_t label[],
32
size_t
label_len)
const override
;
33
34
explicit
X942_PRF
(std::string_view oid) : m_key_wrap_oid(
OID
::from_string(oid)) {}
35
36
explicit
X942_PRF
(
const
OID
& oid) : m_key_wrap_oid(oid) {}
37
38
private
:
39
OID
m_key_wrap_oid;
40
};
41
42
}
// namespace Botan
43
44
#endif
Botan::KDF
Definition
kdf.h:24
Botan::OID
Definition
asn1_obj.h:216
Botan::X942_PRF
Definition
prf_x942.h:19
Botan::X942_PRF::X942_PRF
X942_PRF(std::string_view oid)
Definition
prf_x942.h:34
Botan::X942_PRF::name
std::string name() const override
Definition
prf_x942.cpp:93
Botan::X942_PRF::new_object
std::unique_ptr< KDF > new_object() const override
Definition
prf_x942.h:23
Botan::X942_PRF::X942_PRF
X942_PRF(const OID &oid)
Definition
prf_x942.h:36
Botan::X942_PRF::kdf
void kdf(uint8_t key[], size_t key_len, const uint8_t secret[], size_t secret_len, const uint8_t salt[], size_t salt_len, const uint8_t label[], size_t label_len) const override
Definition
prf_x942.cpp:33
final
int(* final)(unsigned char *, CTX *)
Definition
commoncrypto_hash.cpp:29
Botan
Definition
alg_id.cpp:13
Generated by
1.12.0