Sodium::SecureBuffer Fix copying noaccess SecureBuffer's.
parent
1e240f70b6
commit
f766db7e9e
|
@ -49,7 +49,10 @@ module Sodium
|
|||
# For .dup
|
||||
def initialize(sbuf : self)
|
||||
initialize sbuf.bytesize
|
||||
sbuf.to_slice.copy_to self.to_slice
|
||||
# Maybe not thread safe
|
||||
sbuf.readonly do
|
||||
sbuf.to_slice.copy_to self.to_slice
|
||||
end
|
||||
readonly
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue