Memory holding keys and other secret data should be locked during use, and zeroed upon deallocation. A deleter which zeroes data upon deletion could be added to the unique_ptrs. libsodium [provides means to do so](https://download.libsodium.org/doc/helpers/memory_management.html).
Memory holding keys and other secret data should be locked during use, and zeroed upon deallocation.
A deleter which zeroes data upon deletion could be added to the unique_ptrs.
libsodium provides means to do so.