summaryrefslogtreecommitdiff
path: root/basecode.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-18 04:35:30 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-18 04:35:30 +0000
commita89df27c0f7ded0a673dc84ce0b0e24c6d05e0d0 (patch)
treea25c153b42dc3f510a7981a031bd04dfa0a7a712 /basecode.cpp
parent656db5504c8c656d3981fed232da44b2f28b1feb (diff)
downloadcryptopp-a89df27c0f7ded0a673dc84ce0b0e24c6d05e0d0.tar.gz
misc changes
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@103 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'basecode.cpp')
-rw-r--r--basecode.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/basecode.cpp b/basecode.cpp
index 8b42073..e439e10 100644
--- a/basecode.cpp
+++ b/basecode.cpp
@@ -12,16 +12,16 @@ NAMESPACE_BEGIN(CryptoPP)
void BaseN_Encoder::IsolatedInitialize(const NameValuePairs &parameters)
{
- parameters.GetRequiredParameter("BaseN_Encoder", "EncodingLookupArray", m_alphabet);
+ parameters.GetRequiredParameter("BaseN_Encoder", Name::EncodingLookupArray(), m_alphabet);
- parameters.GetRequiredIntParameter("BaseN_Encoder", "Log2Base", m_bitsPerChar);
+ parameters.GetRequiredIntParameter("BaseN_Encoder", Name::Log2Base(), m_bitsPerChar);
if (m_bitsPerChar <= 0 || m_bitsPerChar >= 8)
throw InvalidArgument("BaseN_Encoder: Log2Base must be between 1 and 7 inclusive");
byte padding;
bool pad;
- if (parameters.GetValue("PaddingByte", padding))
- pad = parameters.GetValueWithDefault("Pad", true);
+ if (parameters.GetValue(Name::PaddingByte(), padding))
+ pad = parameters.GetValueWithDefault(Name::Pad(), true);
else
pad = false;
m_padding = pad ? padding : -1;
@@ -105,9 +105,9 @@ unsigned int BaseN_Encoder::Put2(const byte *begin, unsigned int length, int mes
void BaseN_Decoder::IsolatedInitialize(const NameValuePairs &parameters)
{
- parameters.GetRequiredParameter("BaseN_Decoder", "DecodingLookupArray", m_lookup);
+ parameters.GetRequiredParameter("BaseN_Decoder", Name::DecodingLookupArray(), m_lookup);
- parameters.GetRequiredIntParameter("BaseN_Decoder", "Log2Base", m_bitsPerChar);
+ parameters.GetRequiredIntParameter("BaseN_Decoder", Name::Log2Base(), m_bitsPerChar);
if (m_bitsPerChar <= 0 || m_bitsPerChar >= 8)
throw InvalidArgument("BaseN_Decoder: Log2Base must be between 1 and 7 inclusive");
@@ -189,13 +189,13 @@ void BaseN_Decoder::InitializeDecodingLookupArray(int *lookup, const byte *alpha
void Grouper::IsolatedInitialize(const NameValuePairs &parameters)
{
- m_groupSize = parameters.GetIntValueWithDefault("GroupSize", 0);
+ m_groupSize = parameters.GetIntValueWithDefault(Name::GroupSize(), 0);
ConstByteArrayParameter separator, terminator;
if (m_groupSize)
- parameters.GetRequiredParameter("Grouper", "Separator", separator);
+ parameters.GetRequiredParameter("Grouper", Name::Separator(), separator);
else
- parameters.GetValue("Separator", separator);
- parameters.GetValue("Terminator", terminator);
+ parameters.GetValue(Name::Separator(), separator);
+ parameters.GetValue(Name::Terminator(), terminator);
m_separator.Assign(separator.begin(), separator.size());
m_terminator.Assign(terminator.begin(), terminator.size());