mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-02-12 08:11:05 +00:00
Clear asserts under DEBUG builds
This commit is contained in:
parent
fd7115fc8b
commit
2ffa70fbc6
@ -405,8 +405,9 @@ RandomNumberGenerator & NullRNG()
|
||||
|
||||
bool HashTransformation::TruncatedVerify(const byte *digest, size_t digestLength)
|
||||
{
|
||||
// Allocate at least 1 for calculated to avoid triggering diagnostics
|
||||
ThrowIfInvalidTruncatedSize(digestLength);
|
||||
SecByteBlock calculated(digestLength);
|
||||
SecByteBlock calculated(digestLength ? digestLength : 1);
|
||||
TruncatedFinal(calculated, digestLength);
|
||||
return VerifyBufsEqual(calculated, digest, digestLength);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ bool CryptoSystemValidate(PK_Decryptor &priv, PK_Encryptor &pub, bool thorough)
|
||||
std::cout << (fail ? "FAILED " : "passed ");
|
||||
std::cout << "cryptosystem key validation\n";
|
||||
|
||||
const byte *message = (byte *)"test message";
|
||||
const byte message[] = "test message";
|
||||
const int messageLen = 12;
|
||||
SecByteBlock ciphertext(priv.CiphertextLength(messageLen));
|
||||
SecByteBlock plaintext(priv.MaxPlaintextLength(ciphertext.size()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user