Botan 2.19.3
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
10namespace Botan {
11
13 {
14 uint8_t inb[sizeof(val)];
15 store_be(val, inb);
16 add_data(inb, sizeof(inb));
17 }
18
20 {
21 uint8_t inb[sizeof(val)];
22 store_be(val, inb);
23 add_data(inb, sizeof(inb));
24 }
25
27 {
28 uint8_t inb[sizeof(val)];
29 store_be(val, inb);
30 add_data(inb, sizeof(inb));
31 }
32
34 {
35 uint8_t inb[sizeof(val)];
36 store_le(val, inb);
37 add_data(inb, sizeof(inb));
38 }
39
41 {
42 uint8_t inb[sizeof(val)];
43 store_le(val, inb);
44 add_data(inb, sizeof(inb));
45 }
46
48 {
49 uint8_t inb[sizeof(val)];
50 store_le(val, inb);
51 add_data(inb, sizeof(inb));
52 }
53
54}
void update_le(uint16_t val)
Definition buf_comp.cpp:33
void update_be(uint16_t val)
Definition buf_comp.cpp:12
void store_be(uint16_t in, uint8_t out[2])
Definition loadstor.h:438
void store_le(uint16_t in, uint8_t out[2])
Definition loadstor.h:454