Botan
3.7.1
Crypto and TLS for C&
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
c
d
f
i
m
n
r
s
t
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
f
h
i
m
n
o
p
r
s
t
u
v
w
Enumerations
b
c
d
e
k
m
n
o
p
s
t
x
Enumerator
_
a
b
c
d
e
f
h
k
l
m
n
p
q
r
s
t
u
w
x
Related Symbols
b
c
d
e
f
k
o
p
s
t
x
Files
File List
File Members
All
_
a
b
c
d
e
f
i
k
m
n
o
p
q
s
t
u
w
x
y
z
Functions
b
c
Variables
Typedefs
b
c
e
p
t
Enumerations
Enumerator
b
c
d
e
k
n
Macros
_
a
b
c
f
m
n
q
s
t
w
src
lib
tls
tls12
tls_handshake_hash.cpp
Go to the documentation of this file.
1
/*
2
* TLS Handshake Hash
3
* (C) 2004-2006,2011,2012 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7
8
#include <botan/internal/tls_handshake_hash.h>
9
10
#include <botan/hash.h>
11
12
namespace
Botan::TLS
{
13
14
/**
15
* Return a TLS Handshake Hash
16
*/
17
secure_vector<uint8_t>
Handshake_Hash::final
(std::string_view mac_algo)
const
{
18
std::string hash_algo(mac_algo);
19
if
(hash_algo ==
"SHA-1"
) {
20
hash_algo =
"SHA-256"
;
21
}
22
23
auto
hash =
HashFunction::create_or_throw
(hash_algo);
24
hash->update(m_data);
25
return
hash->final();
26
}
17
secure_vector<uint8_t>
Handshake_Hash::final
(std::string_view mac_algo)
const
{
…
}
27
28
}
// namespace Botan::TLS
Botan::HashFunction::create_or_throw
static std::unique_ptr< HashFunction > create_or_throw(std::string_view algo_spec, std::string_view provider="")
Definition
hash.cpp:298
Botan::TLS::Handshake_Hash::final
secure_vector< uint8_t > final(std::string_view mac_algo) const
Definition
tls_handshake_hash.cpp:17
Botan::TLS
Definition
asio_context.cpp:17
Botan::secure_vector
std::vector< T, secure_allocator< T > > secure_vector
Definition
secmem.h:61
Generated by
1.12.0