Botan 2.19.5 Crypto and TLS for C&

buf_comp.cpp
Go to the documentation of this file.
1/*
2* (C) 2019 Jack Lloyd
3*
4* Botan is released under the Simplified BSD License (see license.txt)
5*/
6
7#include <botan/buf_comp.h>
8#include <botan/loadstor.h>
9
10 namespace Botan {
11
12 void Buffered_Computation::update_be(uint16_t val)
13 {
14 uint8_t inb[sizeof(val)];
15 store_be(val, inb);
16 add_data(inb, sizeof(inb));
17 }
18
19 void Buffered_Computation::update_be(uint32_t val)
20 {
21 uint8_t inb[sizeof(val)];
22 store_be(val, inb);
23 add_data(inb, sizeof(inb));
24 }
25
26 void Buffered_Computation::update_be(uint64_t val)
27 {
28 uint8_t inb[sizeof(val)];
29 store_be(val, inb);
30 add_data(inb, sizeof(inb));
31 }
32
33 void Buffered_Computation::update_le(uint16_t val)
34 {
35 uint8_t inb[sizeof(val)];
36 store_le(val, inb);
37 add_data(inb, sizeof(inb));
38 }
39
40 void Buffered_Computation::update_le(uint32_t val)
41 {
42 uint8_t inb[sizeof(val)];
43 store_le(val, inb);
44 add_data(inb, sizeof(inb));
45 }
46
47 void Buffered_Computation::update_le(uint64_t val)
48 {
49 uint8_t inb[sizeof(val)];
50 store_le(val, inb);
51 add_data(inb, sizeof(inb));
52 }
53
54}
Botan::Buffered_Computation::update_le
void update_le(uint16_t val)
Definition: buf_comp.cpp:33
Botan::Buffered_Computation::update_be
void update_be(uint16_t val)
Definition: buf_comp.cpp:12
Botan
Definition: alg_id.cpp:13
Botan::store_be
void store_be(uint16_t in, uint8_t out[2])
Definition: loadstor.h:438
Botan::store_le
void store_le(uint16_t in, uint8_t out[2])
Definition: loadstor.h:454