Debian Codegraph @

mlspp/lib/hpke/src/common.cpp

raw symbols SCIP
1 #cxx . . $ `<file>/mlspp/lib/hpke/src/common.cpp`/include "common.h"cxx . . $ `<file>/mlspp/lib/hpke/src/common.h`/
2
3 namespace mlsppcxx . . $ mlspp/::hpkecxx . . $ mlspp/hpke/ {
4
5 bytescxx . . $ mlspp/bytes_ns/bytes#
6 i2ospcxx . . $ mlspp/hpke/i2osp(b57ad3058a1ef3ae).(uint64_tcxx . . $ uint64_t# val, size_t size)
7 {
8 auto out = bytescxx . . $ mlspp/bytes_ns/bytes#bytes(913f486ae89fd8a8).(size, 0);
9 auto max = size;
10 if (size > 8) {
11 max = 8;
12 }
13
14 for (size_t i = 0; i < max; i++) {
15 out.atcxx . . $ mlspp/bytes_ns/bytes#at(b19923e35e3d04d7).(size - i - 1) = static_cast<uint8_tcxx . . $ uint8_t#>(val >> (8 * i));
16 }
17 return outcxx . . $ mlspp/bytes_ns/bytes#bytes(628b76f52f2a67f).;
18 }
19
20 } // namespace mlspp::hpke