SecureBuffer#wipe with block
This commit is contained in:
parent
b55b6808f2
commit
0187d06e96
@ -64,6 +64,12 @@ module Sodium
|
||||
noaccess!
|
||||
end
|
||||
|
||||
def wipe
|
||||
yield
|
||||
ensure
|
||||
wipe
|
||||
end
|
||||
|
||||
def finalize
|
||||
LibSodium.sodium_free @ptr
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user