Botan 3.3.0
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
9#include <botan/internal/loadstor.h>
10
11namespace Botan {
12
14 uint8_t inb[sizeof(val)];
15 store_be(val, inb);
16 add_data({inb, sizeof(inb)});
17}
18
20 uint8_t inb[sizeof(val)];
21 store_be(val, inb);
22 add_data({inb, sizeof(inb)});
23}
24
26 uint8_t inb[sizeof(val)];
27 store_be(val, inb);
28 add_data({inb, sizeof(inb)});
29}
30
32 uint8_t inb[sizeof(val)];
33 store_le(val, inb);
34 add_data({inb, sizeof(inb)});
35}
36
38 uint8_t inb[sizeof(val)];
39 store_le(val, inb);
40 add_data({inb, sizeof(inb)});
41}
42
44 uint8_t inb[sizeof(val)];
45 store_le(val, inb);
46 add_data({inb, sizeof(inb)});
47}
48
49} // namespace Botan
void update_le(uint16_t val)
Definition buf_comp.cpp:31
void update_be(uint16_t val)
Definition buf_comp.cpp:13
constexpr void store_be(T in, OutR &&out_range)
Definition loadstor.h:358
constexpr void store_le(T in, OutR &&out_range)
Definition loadstor.h:383