Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道如何创建 Botan::MemoryRegion 类型的对象以用于此方法?
BigInt BOTAN_DLL fe1_encrypt(const BigInt& n, const BigInt& X, const SymmetricKey& key, const MemoryRegion<byte>& tweak);
两者MemoryVector和SecureVector继承自MemoryRegion和可以使用非常相似std::vector。
MemoryVector
SecureVector
MemoryRegion
std::vector
BYTE tweakData[tweakDataLen] = { ... }; MemoryVector<byte> myTweak(tweakData, tweakDataLen);
SecureVector采取一些预防措施来防止数据四处传播(例如,在删除之前覆盖并抑制一些交换到磁盘的情况)