Skip to content

Commit 322c67f

Browse files
committed
Use previous digest size as a default value in BLAKE2
1 parent 0d44176 commit 322c67f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

blake2.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ void BLAKE2s::UncheckedSetKey(const byte *key, unsigned int length, const Crypto
389389
m_keyLength = 0;
390390
}
391391

392-
m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), DIGESTSIZE);
392+
m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), m_digestSize);
393393

394394
m_state.Reset();
395395
m_block.Reset(m_digestSize, m_keyLength);
@@ -420,7 +420,7 @@ void BLAKE2b::UncheckedSetKey(const byte *key, unsigned int length, const Crypto
420420
m_keyLength = 0;
421421
}
422422

423-
m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), DIGESTSIZE);
423+
m_digestSize = params.GetIntValueWithDefault(Name::DigestSize(), m_digestSize);
424424

425425
m_state.Reset();
426426
m_block.Reset(m_digestSize, m_keyLength);

0 commit comments

Comments
 (0)