diff --git a/blake2.cpp b/blake2.cpp index 5d3154fb..d3af047a 100644 --- a/blake2.cpp +++ b/blake2.cpp @@ -351,7 +351,7 @@ BLAKE2_Base::BLAKE2_Base(bool treeMode, unsigned int digestSize) : m { CRYPTOPP_ASSERT(digestSize <= DIGESTSIZE); - UncheckedSetKey(NULLPTR, 0, g_nullNameValuePairs); + UncheckedSetKey(NULL, 0, MakeParameters(Name::DigestSize(), (int)digestSize)(Name::TreeMode(), treeMode, false)); Restart(); } diff --git a/validat3.cpp b/validat3.cpp index 2ff56541..e8ad4ff7 100644 --- a/validat3.cpp +++ b/validat3.cpp @@ -1085,6 +1085,30 @@ bool ValidateBLAKE2s() } static const BLAKE2_TestTuples tests[] = { + { + NULLPTR, + NULLPTR, + "\x8F\x38", + 0, 0, 2 + }, + { + NULLPTR, + NULLPTR, + "\x36\xE9\xD2\x46", + 0, 0, 4 + }, + { + NULLPTR, + NULLPTR, + "\xEF\x2A\x8B\x78\xDD\x80\xDA\x9C", + 0, 0, 8 + }, + { + NULLPTR, + NULLPTR, + "\x64\x55\x0D\x6F\xFE\x2C\x0A\x01\xA1\x4A\xBA\x1E\xAD\xE0\x20\x0C", + 0, 0, 16 + }, { NULLPTR, NULLPTR, @@ -1450,11 +1474,23 @@ bool ValidateBLAKE2s() byte digest[BLAKE2s::DIGESTSIZE]; for (unsigned int i=0; i