Ensure memsets of sensitive memory aren't optimized away

This commit is contained in:
Andrew Ayer
2014-07-23 19:32:30 -07:00
parent 23ff272f7d
commit 477983f4bc
5 changed files with 17 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ Aes_ctr_encryptor::Aes_ctr_encryptor (const unsigned char* raw_key, const unsign
Aes_ctr_encryptor::~Aes_ctr_encryptor ()
{
std::memset(pad, '\0', BLOCK_LEN);
explicit_memset(pad, '\0', BLOCK_LEN);
}
void Aes_ctr_encryptor::process (const unsigned char* in, unsigned char* out, size_t len)