Use previous digest size as a default value in BLAKE2

pull/748/head
Jeffrey Walton 2018-11-21 13:28:21 -05:00
parent 0d44176fd1
commit 322c67f373
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 2 additions and 2 deletions

View File

@ -389,7 +389,7 @@ void BLAKE2s::UncheckedSetKey(const byte *key, unsigned int length, const Crypto
m_keyLength = 0;
}
m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), DIGESTSIZE);
m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), m_digestSize);
m_state.Reset();
m_block.Reset(m_digestSize, m_keyLength);
@ -420,7 +420,7 @@ void BLAKE2b::UncheckedSetKey(const byte *key, unsigned int length, const Crypto
m_keyLength = 0;
}
m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), DIGESTSIZE);
m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), m_digestSize);
m_state.Reset();
m_block.Reset(m_digestSize, m_keyLength);