diff options
author | weidai <weidai11@users.noreply.github.com> | 2003-07-18 04:35:30 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2003-07-18 04:35:30 +0000 |
commit | 5b2008101cb8123db25bbe99a2e3688fc426edbc (patch) | |
tree | a25c153b42dc3f510a7981a031bd04dfa0a7a712 /hex.cpp | |
parent | b3d4024665640987ee62a348cfc3e9cfe7e1536e (diff) | |
download | cryptopp-git-5b2008101cb8123db25bbe99a2e3688fc426edbc.tar.gz |
misc changes
Diffstat (limited to 'hex.cpp')
-rw-r--r-- | hex.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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]; |