aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/base
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-08-06 03:39:49 -0400
committerJack Lloyd <[email protected]>2019-09-06 07:04:46 -0400
commitd187ddcaebe11a324f0efb20eb67a842929adc6f (patch)
treea8ec6b1076eff60f7475dd7a904a1934192fcf10 /src/lib/base
parentcc6b42d71b0cdc2ebfa2b33b5039991f2d79f606 (diff)
Deprecate many publically available headers
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 {
/**