Increase OpSec by clearing memory when ByteVector is not needed anymore.

dependabot/npm_and_yarn/Src/WebController/UI/websocket-extensions-0.1.4
Pawel Kurowski 2019-09-13 11:31:12 +02:00
parent 89ffafa210
commit a2f9047aef
2 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,13 @@
#include "StdAfx.h"
#include "ByteVector.h"
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
MWR::ByteVector::~ByteVector()
{
// Increase OpSec by clearing memory when ByteVector is not needed anymore.
SecureZeroMemory(data(), size());
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
MWR::ByteVector::ByteVector(ByteVector const& other)
: Super(static_cast<Super const&>(other))

View File

@ -35,6 +35,9 @@ namespace MWR
/// Type of stored values.
using ValueType = Super::value_type;
/// Destructor zeroing memory.
~ByteVector();
/// Copy constructor.
/// @param other. Object to copy.
ByteVector(ByteVector const& other);