コード例 #1
0
ファイル: modes.cpp プロジェクト: 0xmono/miranda-ng
void BlockOrientedCipherModeBase::UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params)
{
	m_cipher->SetKey(key, length, params);
	ResizeBuffers();
	if (IsResynchronizable())
		Resynchronize(GetIVAndThrowIfInvalid(params));
}
コード例 #2
0
ファイル: cryptlib.cpp プロジェクト: LjApps/eMule-VeryCD
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");
}
コード例 #3
0
ファイル: cryptlib.cpp プロジェクト: LjApps/eMule-VeryCD
void SimpleKeyingInterface::ThrowIfResynchronizable()
{
	if (IsResynchronizable())
		throw InvalidArgument("SimpleKeyingInterface: this object requires an IV");
}
コード例 #4
0
ファイル: cryptlib.cpp プロジェクト: 13971643458/qtum
void SimpleKeyingInterface::ThrowIfResynchronizable()
{
	if (IsResynchronizable())
		throw InvalidArgument(GetAlgorithm().AlgorithmName() + ": this object requires an IV");
}
コード例 #5
0
ファイル: cryptlib.cpp プロジェクト: Dangr8/Cities3D
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");
}