summaryrefslogtreecommitdiffstats
path: root/comm/third_party/botan/src/lib/base/buf_comp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'comm/third_party/botan/src/lib/base/buf_comp.cpp')
-rw-r--r--comm/third_party/botan/src/lib/base/buf_comp.cpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/comm/third_party/botan/src/lib/base/buf_comp.cpp b/comm/third_party/botan/src/lib/base/buf_comp.cpp
new file mode 100644
index 0000000000..e9a33c9d7f
--- /dev/null
+++ b/comm/third_party/botan/src/lib/base/buf_comp.cpp
@@ -0,0 +1,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));
+ }
+
+}