mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
verify streaming packet signature
This commit is contained in:
parent
96b5907173
commit
9b8460cffa
4 changed files with 28 additions and 10 deletions
10
Identity.cpp
10
Identity.cpp
|
@ -107,7 +107,15 @@ namespace data
|
|||
return m_Verifier->GetPublicKeyLen ();
|
||||
return 128;
|
||||
}
|
||||
|
||||
|
||||
size_t IdentityEx::GetSignatureLen ()
|
||||
{
|
||||
if (!m_Verifier)
|
||||
CreateVerifier ();
|
||||
if (m_Verifier)
|
||||
return m_Verifier->GetSignatureLen ();
|
||||
return 40;
|
||||
}
|
||||
bool IdentityEx::Verify (const uint8_t * buf, size_t len, const uint8_t * signature)
|
||||
{
|
||||
if (!m_Verifier)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue