SecureBuffer#wipe with block

This commit is contained in:
Didactic Drunk 2021-03-22 10:23:13 -07:00
parent b55b6808f2
commit 0187d06e96

View File

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