aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/loadstor.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-02-02 10:49:43 +0000
committerlloyd <[email protected]>2010-02-02 10:49:43 +0000
commit7667619fa001b4b9dd9df663fc01fa7c31e5f4f9 (patch)
treed5e20f6b94478df76893755adb54c66ae6276abf /src/utils/loadstor.h
parentcf3e984dbffc0fb2a695306a9b4d53257bb74ea8 (diff)
Move the get_byte template to its own header, because many files
including loadstor.h actually just needed get_byte and nothing else.
Diffstat (limited to 'src/utils/loadstor.h')
-rw-r--r--src/utils/loadstor.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/utils/loadstor.h b/src/utils/loadstor.h
index bd2acc87d..ffd27540d 100644
--- a/src/utils/loadstor.h
+++ b/src/utils/loadstor.h
@@ -11,6 +11,7 @@
#include <botan/types.h>
#include <botan/bswap.h>
+#include <botan/get_byte.h>
#include <cstring>
#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK
@@ -38,16 +39,6 @@
namespace Botan {
/*
-* Byte Extraction Function
-*/
-template<typename T> inline byte get_byte(u32bit byte_num, T input)
- {
- return static_cast<byte>(
- input >> ((sizeof(T)-1-(byte_num&(sizeof(T)-1))) << 3)
- );
- }
-
-/*
* Byte to Word Conversions
*/
inline u16bit make_u16bit(byte i0, byte i1)