How to use Botan :: MemoryRegion?
1 answer
Both MemoryVector
and SecureVector
inherit from MemoryRegion
and can be used very similar to std::vector
.
BYTE tweakData[tweakDataLen] = { ... };
MemoryVector<byte> myTweak(tweakData, tweakDataLen);
SecureVector
takes some precautions to prevent data propagation (e.g. overwrite-before-delete and suppress some swap scripts)
+2
source to share