void BlockOrientedCipherModeBase::UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms) { m_cipher->SetKey(key, length, params); ResizeBuffers(); if (IsResynchronizable()) Resynchronize(GetIVAndThrowIfInvalid(params)); }
void SimpleKeyingInterface::ThrowIfInvalidIV(const byte *iv) { if (!iv && !(IVRequirement() == INTERNALLY_GENERATED_IV || IVRequirement() == STRUCTURED_IV || !IsResynchronizable())) throw InvalidArgument("SimpleKeyingInterface: this object cannot use a null IV"); }
void SimpleKeyingInterface::ThrowIfResynchronizable() { if (IsResynchronizable()) throw InvalidArgument("SimpleKeyingInterface: this object requires an IV"); }
void SimpleKeyingInterface::ThrowIfResynchronizable() { if (IsResynchronizable()) throw InvalidArgument(GetAlgorithm().AlgorithmName() + ": this object requires an IV"); }
void SimpleKeyingInterface::ThrowIfInvalidIV(const byte *iv) { if (!iv && !(IVRequirement() == INTERNALLY_GENERATED_IV || IVRequirement() == UNIQUE_IV || !IsResynchronizable())) throw InvalidArgument(GetAlgorithm().AlgorithmName() + ": this object cannot use a null IV"); }