From a89df27c0f7ded0a673dc84ce0b0e24c6d05e0d0 Mon Sep 17 00:00:00 2001 From: weidai Date: Fri, 18 Jul 2003 04:35:30 +0000 Subject: misc changes git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@103 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- hex.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'hex.cpp') diff --git a/hex.cpp b/hex.cpp index 5ac6e8c..3156167 100644 --- a/hex.cpp +++ b/hex.cpp @@ -13,13 +13,20 @@ static const byte s_vecLower[] = "0123456789abcdef"; void HexEncoder::IsolatedInitialize(const NameValuePairs ¶meters) { - bool uppercase = parameters.GetValueWithDefault("Uppercase", true); + bool uppercase = parameters.GetValueWithDefault(Name::Uppercase(), true); m_filter->Initialize(CombinedNameValuePairs( parameters, - MakeParameters("EncodingLookupArray", uppercase ? &s_vecUpper[0] : &s_vecLower[0])("Log2Base", 4))); + MakeParameters(Name::EncodingLookupArray(), uppercase ? &s_vecUpper[0] : &s_vecLower[0], false)(Name::Log2Base(), 4, true))); } -const int *HexDecoder::GetDecodingLookupArray() +void HexDecoder::IsolatedInitialize(const NameValuePairs ¶meters) +{ + BaseN_Decoder::Initialize(CombinedNameValuePairs( + parameters, + MakeParameters(Name::DecodingLookupArray(), GetDefaultDecodingLookupArray(), false)(Name::Log2Base(), 4, true))); +} + +const int *HexDecoder::GetDefaultDecodingLookupArray() { static bool s_initialized = false; static int s_array[256]; -- cgit v1.2.1