Allow encrypted M17 data to be rejected.

This commit is contained in:
Jonathan Naylor
2020-10-26 10:10:31 +00:00
parent d0e8574187
commit 31002c2757
8 changed files with 48 additions and 8 deletions

View File

@@ -89,6 +89,11 @@ void CM17LICH::setDataType(unsigned char type)
m_lich[13U] |= (type << 1) & 0x06U;
}
bool CM17LICH::isNONCENull() const
{
return ::memcmp(m_lich + 14U, M17_NULL_NONCE, M17_NONCE_LENGTH_BYTES) == 0;
}
void CM17LICH::reset()
{
::memset(m_lich, 0x00U, 30U);