SecureBuffer#wipe with block

master
Didactic Drunk 2021-03-22 10:23:13 -07:00
parent b55b6808f2
commit 0187d06e96
1 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,12 @@ module Sodium
noaccess!
end
def wipe
yield
ensure
wipe
end
def finalize
LibSodium.sodium_free @ptr
end