aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/base
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-09-08 10:22:09 -0400
committerJack Lloyd <[email protected]>2019-09-08 10:22:09 -0400
commit63e8dc8a6aade2ce3c32b095b36de5839a30444f (patch)
tree06ea55071183d537f84046894f799b2fc571ff0b /src/lib/base
parenta25821cb4c277d2913520e70203cebb8c6fd85cb (diff)
parent7f412dde77c7fbd3d8857e9c42aa71ba1ca2de2f (diff)
Merge GH #2061 Add header deprecation warnings
Diffstat (limited to 'src/lib/base')
-rw-r--r--src/lib/base/buf_comp.cpp54
-rw-r--r--src/lib/base/buf_comp.h27
-rw-r--r--src/lib/base/scan_name.h2
3 files changed, 62 insertions, 21 deletions
diff --git a/src/lib/base/buf_comp.cpp b/src/lib/base/buf_comp.cpp
new file mode 100644
index 000000000..e9a33c9d7
--- /dev/null
+++ b/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));
+ }
+
+}
diff --git a/src/lib/base/buf_comp.h b/src/lib/base/buf_comp.h
index e1971c458..31bf48529 100644
--- a/src/lib/base/buf_comp.h
+++ b/src/lib/base/buf_comp.h
@@ -9,7 +9,6 @@
#define BOTAN_BUFFERED_COMPUTATION_H_
#include <botan/secmem.h>
-#include <botan/loadstor.h>
#include <string>
namespace Botan {
@@ -51,27 +50,13 @@ class BOTAN_PUBLIC_API(2,0) Buffered_Computation
add_data(in.data(), in.size());
}
- /**
- * Add an integer in big-endian order
- * @param in the value
- */
- template<typename T> void update_be(const T in)
- {
- uint8_t inb[sizeof(T)];
- store_be(in, inb);
- add_data(inb, sizeof(inb));
- }
+ void update_be(uint16_t val);
+ void update_be(uint32_t val);
+ void update_be(uint64_t val);
- /**
- * Add an integer in little-endian order
- * @param in the value
- */
- template<typename T> void update_le(const T in)
- {
- uint8_t inb[sizeof(T)];
- store_le(in, inb);
- add_data(inb, sizeof(inb));
- }
+ void update_le(uint16_t val);
+ void update_le(uint32_t val);
+ void update_le(uint64_t val);
/**
* Add new input to process.
diff --git a/src/lib/base/scan_name.h b/src/lib/base/scan_name.h
index 4028ce9ab..069783d1b 100644
--- a/src/lib/base/scan_name.h
+++ b/src/lib/base/scan_name.h
@@ -12,6 +12,8 @@
#include <string>
#include <vector>
+BOTAN_FUTURE_INTERNAL_HEADER(scan_name.h)
+
namespace Botan {
/**