-
-
Notifications
You must be signed in to change notification settings - Fork 3
Secure Memory Example
Andrew Lambert edited this page Nov 26, 2022
·
7 revisions
libsodium offers guarded heap allocations and facilities to limit access to pages of memory. These features are exposed in the SecureMemoryBlock class.
Dim mb As New libsodium.SecureMemoryBlock(64) ' allocate 64 bytes
Dim mb As New libsodium.SecureMemoryBlock(64) ' allocate 64 bytes
mb.CString(0) = "Hello, world!"
Dim mb As New libsodium.SecureMemoryBlock(64) ' allocate 64 bytes
mb.CString(0) = "Hello, world!"
MsgBox(mb.CString(0)) ' read data
Dim mb As New libsodium.SecureMemoryBlock(64) ' allocate 64 bytes
mb.ProtectionLevel = libsodium.ProtectionLevel.ReadOnly
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2016-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.