Sodium::SecureBuffer Fix copying noaccess SecureBuffer's.
This commit is contained in:
parent
1e240f70b6
commit
f766db7e9e
@ -49,7 +49,10 @@ module Sodium
|
|||||||
# For .dup
|
# For .dup
|
||||||
def initialize(sbuf : self)
|
def initialize(sbuf : self)
|
||||||
initialize sbuf.bytesize
|
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
|
readonly
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user