SecureBuffer#wipe with block
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