summaryrefslogtreecommitdiff
path: root/hex.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-11-05 01:59:46 -0500
committerJeffrey Walton <noloader@gmail.com>2015-11-05 01:59:46 -0500
commit48809d4e85c125814425c621d8d0d89f95405924 (patch)
tree1010fd16c4b1199f3d27dd726dda241a2bd29f83 /hex.cpp
parent025337a94aceb75d188149db70c2094673772816 (diff)
downloadcryptopp-git-48809d4e85c125814425c621d8d0d89f95405924.tar.gz
CRYPTOPP 5.6.3 RC6 checkin
Diffstat (limited to 'hex.cpp')
-rw-r--r--hex.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/hex.cpp b/hex.cpp
index 5731df55..ec09a05c 100644
--- a/hex.cpp
+++ b/hex.cpp
@@ -1,44 +1,44 @@
-// hex.cpp - written and placed in the public domain by Wei Dai
-
-#include "pch.h"
-
-#ifndef CRYPTOPP_IMPORTS
-
-#include "hex.h"
-
-NAMESPACE_BEGIN(CryptoPP)
-
-static const byte s_vecUpper[] = "0123456789ABCDEF";
-static const byte s_vecLower[] = "0123456789abcdef";
-
-void HexEncoder::IsolatedInitialize(const NameValuePairs &parameters)
-{
- bool uppercase = parameters.GetValueWithDefault(Name::Uppercase(), true);
- m_filter->Initialize(CombinedNameValuePairs(
- parameters,
- MakeParameters(Name::EncodingLookupArray(), uppercase ? &s_vecUpper[0] : &s_vecLower[0], false)(Name::Log2Base(), 4, true)));
-}
-
-void HexDecoder::IsolatedInitialize(const NameValuePairs &parameters)
-{
- BaseN_Decoder::IsolatedInitialize(CombinedNameValuePairs(
- parameters,
- MakeParameters(Name::DecodingLookupArray(), GetDefaultDecodingLookupArray(), false)(Name::Log2Base(), 4, true)));
-}
-
-const int *HexDecoder::GetDefaultDecodingLookupArray()
-{
- static volatile bool s_initialized = false;
- static int s_array[256];
-
- if (!s_initialized)
- {
- InitializeDecodingLookupArray(s_array, s_vecUpper, 16, true);
- s_initialized = true;
- }
- return s_array;
-}
-
-NAMESPACE_END
-
-#endif
+// hex.cpp - written and placed in the public domain by Wei Dai
+
+#include "pch.h"
+
+#ifndef CRYPTOPP_IMPORTS
+
+#include "hex.h"
+
+NAMESPACE_BEGIN(CryptoPP)
+
+static const byte s_vecUpper[] = "0123456789ABCDEF";
+static const byte s_vecLower[] = "0123456789abcdef";
+
+void HexEncoder::IsolatedInitialize(const NameValuePairs &parameters)
+{
+ bool uppercase = parameters.GetValueWithDefault(Name::Uppercase(), true);
+ m_filter->Initialize(CombinedNameValuePairs(
+ parameters,
+ MakeParameters(Name::EncodingLookupArray(), uppercase ? &s_vecUpper[0] : &s_vecLower[0], false)(Name::Log2Base(), 4, true)));
+}
+
+void HexDecoder::IsolatedInitialize(const NameValuePairs &parameters)
+{
+ BaseN_Decoder::IsolatedInitialize(CombinedNameValuePairs(
+ parameters,
+ MakeParameters(Name::DecodingLookupArray(), GetDefaultDecodingLookupArray(), false)(Name::Log2Base(), 4, true)));
+}
+
+const int *HexDecoder::GetDefaultDecodingLookupArray()
+{
+ static volatile bool s_initialized = false;
+ static int s_array[256];
+
+ if (!s_initialized)
+ {
+ InitializeDecodingLookupArray(s_array, s_vecUpper, 16, true);
+ s_initialized = true;
+ }
+ return s_array;
+}
+
+NAMESPACE_END
+
+#endif