Botan
3.6.1
Crypto and TLS for C&
src
lib
kdf
prf_tls
prf_tls.h
Go to the documentation of this file.
1
/*
2
* TLSv1.2 PRF
3
* (C) 2004-2010 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7
8
#ifndef BOTAN_TLS_V12_PRF_H_
9
#define BOTAN_TLS_V12_PRF_H_
10
11
#include <botan/kdf.h>
12
#include <botan/mac.h>
13
14
namespace
Botan
{
15
16
/**
17
* PRF used in TLS 1.2
18
*/
19
class
TLS_12_PRF
final
:
public
KDF
{
20
public
:
21
std::string
name
()
const override
;
22
23
std::unique_ptr<KDF>
new_object
()
const override
;
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
/**
35
* @param mac MAC algorithm to use
36
*/
37
explicit
TLS_12_PRF
(std::unique_ptr<MessageAuthenticationCode> mac) : m_mac(std::move(mac)) {}
38
39
private
:
40
std::unique_ptr<MessageAuthenticationCode> m_mac;
41
};
42
43
}
// namespace Botan
44
45
#endif
Botan::KDF
Definition
kdf.h:24
Botan::TLS_12_PRF
Definition
prf_tls.h:19
Botan::TLS_12_PRF::new_object
std::unique_ptr< KDF > new_object() const override
Definition
prf_tls.cpp:57
Botan::TLS_12_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_tls.cpp:61
Botan::TLS_12_PRF::name
std::string name() const override
Definition
prf_tls.cpp:53
Botan::TLS_12_PRF::TLS_12_PRF
TLS_12_PRF(std::unique_ptr< MessageAuthenticationCode > mac)
Definition
prf_tls.h:37
final
int(* final)(unsigned char *, CTX *)
Definition
commoncrypto_hash.cpp:29
Botan
Definition
alg_id.cpp:13
Generated by
1.12.0