delete symmkey on cleanup

This commit is contained in:
orignal 2020-09-08 07:46:55 -04:00
parent a05a54b38e
commit da1e52357f
3 changed files with 13 additions and 2 deletions

View file

@ -88,6 +88,11 @@ namespace garlic
}
}
void RatchetTagSet::DeleteSymmKey (int index)
{
m_ItermediateSymmKeys.erase (index);
}
void RatchetTagSet::Expire ()
{
if (!m_ExpirationTimestamp)
@ -659,7 +664,9 @@ namespace garlic
if (moreTags > 0)
{
GenerateMoreReceiveTags (receiveTagset, moreTags);
receiveTagset->MoveTrimBehind (moreTags >> 1); // /2
index -= (moreTags >> 1); // /2
if (index > 0)
receiveTagset->SetTrimBehind (index);
}
}
return true;