to_slice declare protected

master
Didactic Drunk 2021-06-16 14:20:11 -07:00
parent 13b6c20e7b
commit 1cbb5c7b90
3 changed files with 3 additions and 2 deletions

View File

@ -174,7 +174,7 @@ class MySecret
# optionally mlock # optionally mlock
end end
def to_slice(& : Bytes -> Nil) protected def to_slice(& : Bytes -> Nil)
# The yielded Slice only needs to be valid within the block # The yielded Slice only needs to be valid within the block
# yield Slice.new(pointer, size) # yield Slice.new(pointer, size)
ensure ensure

View File

@ -6,6 +6,7 @@ module Crypto::Secret
# * Not locked in memory # * Not locked in memory
# * Not access protected # * Not access protected
# * No guard pages # * No guard pages
# * Hours of fun
class Bidet class Bidet
include Stateless include Stateless

View File

@ -90,7 +90,7 @@ module Crypto::Secret
abstract def readonly abstract def readonly
abstract def noaccess abstract def noaccess
abstract def to_slice(& : Bytes -> Nil) protected abstract def to_slice(& : Bytes -> Nil)
abstract def bytesize : Int32 abstract def bytesize : Int32
macro delegate_to_slice(to object) macro delegate_to_slice(to object)