blob: e9a33c9d7fe9e8b681de0d3e3c29c649fb832332 (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*
* (C) 2019 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/buf_comp.h>
#include <botan/loadstor.h>
namespace Botan {
void Buffered_Computation::update_be(uint16_t val)
{
uint8_t inb[sizeof(val)];
store_be(val, inb);
add_data(inb, sizeof(inb));
}
void Buffered_Computation::update_be(uint32_t val)
{
uint8_t inb[sizeof(val)];
store_be(val, inb);
add_data(inb, sizeof(inb));
}
void Buffered_Computation::update_be(uint64_t val)
{
uint8_t inb[sizeof(val)];
store_be(val, inb);
add_data(inb, sizeof(inb));
}
void Buffered_Computation::update_le(uint16_t val)
{
uint8_t inb[sizeof(val)];
store_le(val, inb);
add_data(inb, sizeof(inb));
}
void Buffered_Computation::update_le(uint32_t val)
{
uint8_t inb[sizeof(val)];
store_le(val, inb);
add_data(inb, sizeof(inb));
}
void Buffered_Computation::update_le(uint64_t val)
{
uint8_t inb[sizeof(val)];
store_le(val, inb);
add_data(inb, sizeof(inb));
}
}
|