Update Poly1305 nonce length check
parent
a644008679
commit
462bcc859d
|
|
@ -283,7 +283,7 @@ template <class T>
|
||||||
void Poly1305_Base<T>::Resynchronize(const byte *nonce, int nonceLength)
|
void Poly1305_Base<T>::Resynchronize(const byte *nonce, int nonceLength)
|
||||||
{
|
{
|
||||||
CRYPTOPP_ASSERT(nonceLength == -1 || nonceLength == (int)BLOCKSIZE);
|
CRYPTOPP_ASSERT(nonceLength == -1 || nonceLength == (int)BLOCKSIZE);
|
||||||
nonceLength == -1 ? nonceLength = BLOCKSIZE : nonceLength;
|
if (nonceLength == -1) { nonceLength = BLOCKSIZE; }
|
||||||
|
|
||||||
// Encrypt the nonce, stash in m_nk
|
// Encrypt the nonce, stash in m_nk
|
||||||
m_cipher.ProcessBlock(nonce, m_nk.begin());
|
m_cipher.ProcessBlock(nonce, m_nk.begin());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue