SecureBuffer#wipe with block
This commit is contained in:
parent
b55b6808f2
commit
0187d06e96
1 changed files with 6 additions and 0 deletions
|
@ -64,6 +64,12 @@ module Sodium
|
|||
noaccess!
|
||||
end
|
||||
|
||||
def wipe
|
||||
yield
|
||||
ensure
|
||||
wipe
|
||||
end
|
||||
|
||||
def finalize
|
||||
LibSodium.sodium_free @ptr
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue