Crypto++
5.6.3
Free C++ class library of cryptographic schemes
|
Public Member Functions | |
TestDataNameValuePairs (const TestData &data) | |
virtual bool | GetVoidValue (const char *name, const std::type_info &valueType, void *pValue) const |
Get a named value. More... | |
template<class T > | |
bool | GetThisObject (T &object) const |
Get a copy of this object or subobject. More... | |
template<class T > | |
bool | GetThisPointer (T *&ptr) const |
Get a pointer to this object. More... | |
template<class T > | |
bool | GetValue (const char *name, T &value) const |
Get a named value. More... | |
template<class T > | |
T | GetValueWithDefault (const char *name, T defaultValue) const |
Get a named value. More... | |
std::string | GetValueNames () const |
Get a list of value names that can be retrieved. More... | |
bool | GetIntValue (const char *name, int &value) const |
Get a named value with type int. More... | |
int | GetIntValueWithDefault (const char *name, int defaultValue) const |
Get a named value with type int, with default. More... | |
template<class T > | |
void | GetRequiredParameter (const char *className, const char *name, T &value) const |
Retrieves a required name/value pair. More... | |
void | GetRequiredIntParameter (const char *className, const char *name, int &value) const |
Retrieves a required name/value pair. More... | |
Static Public Member Functions | |
static void | ThrowIfTypeMismatch (const char *name, const std::type_info &stored, const std::type_info &retrieving) |
Ensures an expected name and type is present. More... | |
Definition at line 155 of file datatest.cpp.
|
inlinevirtual |
Get a named value.
name | the name of the object or value to retrieve |
valueType | reference to a variable that receives the value |
pValue | void pointer to a variable that receives the value |
GetVoidValue() retrives the value of name if it exists.
Implements NameValuePairs.
Definition at line 160 of file datatest.cpp.
References AAD_CHANNEL, PublicKeyAlgorithm::AccessMaterial(), PrivateKeyAlgorithm::AccessMaterial(), CryptoMaterial::AssignFrom(), Name::DerivedKeyLength(), KeyDerivationFunction::DeriveKey(), Name::DigestSize(), HashTransformation::DigestSize(), Integer::Encode(), Filter::Flush(), g_nullNameValuePairs, RandomNumberGenerator::GenerateBit(), GeneratableCryptoMaterial::GenerateRandom(), NameValuePairs::GetIntValueWithDefault(), PublicKeyAlgorithm::GetMaterial(), PrivateKeyAlgorithm::GetMaterial(), NameValuePairs::GetValue(), NameValuePairs::GetValueNames(), Name::IV(), SimpleKeyingInterface::IVSize(), CryptoMaterial::Load(), BufferedTransformation::MessageEnd(), Integer::MinEncodedSize(), AuthenticatedSymmetricCipher::NeedsPrespecifiedDataLengths(), BlockPaddingSchemeDef::NO_PADDING, Exception::OTHER_ERROR, StreamTransformation::ProcessString(), BufferedTransformation::Ref(), SimpleKeyingInterface::Resynchronize(), CryptoMaterial::Save(), StreamTransformation::Seek(), SimpleKeyingInterface::SetKey(), AuthenticatedSymmetricCipher::SpecifyDataLengths(), CryptoMaterial::Validate(), and xorbuf().
|
inlineinherited |
Get a copy of this object or subobject.
T | class or type |
object | reference to a variable that receives the value |
Definition at line 297 of file cryptlib.h.
Referenced by DL_PrivateKeyImpl< DL_GroupParameters_EC< EC > >::GenerateRandom().
|
inlineinherited |
Get a pointer to this object.
T | class or type |
ptr | reference to a pointer to a variable that receives the value |
Definition at line 306 of file cryptlib.h.
|
inlineinherited |
Get a named value.
T | class or type |
name | the name of the object or value to retrieve |
value | reference to a variable that receives the value |
Definition at line 319 of file cryptlib.h.
Referenced by DL_GroupParameters_EC< EC >::AssignFrom(), KDF2_RNG::GenerateBlock(), DL_GroupParameters_IntegerBased::GenerateRandom(), InvertibleESIGNFunction::GenerateRandom(), DL_GroupParameters_DSA::GenerateRandom(), Store::GetNextMessage(), GetVoidValue(), FileSink::IsolatedInitialize(), Inflator::IsolatedInitialize(), Grouper::IsolatedInitialize(), StringSinkTemplate< T >::IsolatedInitialize(), ArraySink::IsolatedInitialize(), OAEP_Base::MaxUnpaddedLength(), and SimpleKeyingInterface::SetKeyWithIV().
|
inlineinherited |
Get a named value.
T | class or type |
name | the name of the object or value to retrieve |
defaultValue | the default value of the class or type if it does not exist |
Definition at line 332 of file cryptlib.h.
Referenced by DL_GroupParameters_EC< EC >::AssignFrom(), AuthenticatedDecryptionFilter::AuthenticatedDecryptionFilter(), KDF2_RNG::GenerateBlock(), DL_GroupParameters_IntegerBased::GenerateRandom(), InvertibleESIGNFunction::GenerateRandom(), InvertibleLUCFunction::GenerateRandom(), InvertibleRSAFunction::GenerateRandom(), DL_GroupParameters_DSA::GenerateRandom(), Redirector::Initialize(), Deflator::IsolatedInitialize(), FileSink::IsolatedInitialize(), Base64URLEncoder::IsolatedInitialize(), HashFilter::IsolatedInitialize(), SignerFilter::IsolatedInitialize(), CBC_CTS_Encryption::MinLastBlockSize(), HashFilter::Put2(), SignerFilter::Put2(), and ArrayXorSink::Put2().
|
inlineinherited |
Get a list of value names that can be retrieved.
the items in the list are delimited with a colon.
Definition at line 344 of file cryptlib.h.
Referenced by GetVoidValue().
|
inlineinherited |
Get a named value with type int.
name | the name of the value to retrieve |
value | the value retrieved upon success |
GetIntValue() is used to ensure we don't accidentally try to get an unsigned int or some other type when we mean int (which is the most common case)
Definition at line 355 of file cryptlib.h.
Referenced by KDF2_RNG::GenerateBlock(), DL_GroupParameters_IntegerBased::GenerateRandom(), InvertibleRabinFunction::GenerateRandom(), InvertibleRWFunction::GenerateRandom(), InvertibleESIGNFunction::GenerateRandom(), InvertibleLUCFunction::GenerateRandom(), InvertibleRSAFunction::GenerateRandom(), and DL_GroupParameters_DSA::GenerateRandom().
|
inlineinherited |
Get a named value with type int, with default.
name | the name of the value to retrieve |
defaultValue | the default value if the name does not exist |
Definition at line 364 of file cryptlib.h.
Referenced by DL_GroupParameters_IntegerBased::GenerateRandom(), GetVoidValue(), Redirector::Initialize(), ByteQueue::IsolatedInitialize(), Deflator::IsolatedInitialize(), Base64URLEncoder::IsolatedInitialize(), Grouper::IsolatedInitialize(), HashFilter::IsolatedInitialize(), HashFilter::Put2(), VariableRounds< 6, 2 >::StaticGetDefaultRounds(), SAFER::Base::UncheckedSetKey(), and VMAC_Base::UncheckedSetKey().
|
inlinestaticinherited |
Ensures an expected name and type is present.
name | the name of the value |
stored | the type that was stored for the name |
retrieving | the type that is being retrieved for the name |
ValueTypeMismatch |
ThrowIfTypeMismatch() effectively performs a type safety check. stored and retrieving are C++ mangled names for the type.
Definition at line 376 of file cryptlib.h.
Referenced by CombinedNameValuePairs::GetVoidValue().
|
inlineinherited |
Retrieves a required name/value pair.
T | class or type |
className | the name of the class |
name | the name of the value |
value | reference to a variable to receive the value |
InvalidArgument |
GetRequiredParameter() throws InvalidArgument if the name is not present or not of the expected type T.
Definition at line 390 of file cryptlib.h.
Referenced by DL_GroupParameters_EC< EC >::AssignFrom(), StringStore::CopyRangeTo2(), BaseN_Decoder::IsolatedInitialize(), Grouper::IsolatedInitialize(), and RandomNumberSink::IsolatedInitialize().
|
inlineinherited |
Retrieves a required name/value pair.
className | the name of the class |
name | the name of the value |
value | reference to a variable to receive the value |
InvalidArgument |
GetRequiredParameter() throws InvalidArgument if the name is not present or not of the expected type T.
Definition at line 405 of file cryptlib.h.
References g_nullNameValuePairs.
Referenced by StringStore::CopyRangeTo2(), and BaseN_Decoder::IsolatedInitialize().