Crypto::Secret Add protection method stubs
This commit is contained in:
parent
c00910a6b2
commit
de11459cb1
@ -1,6 +1,8 @@
|
|||||||
# Interface to hold sensitive information (often cryptographic keys)
|
# Interface to hold sensitive information (often cryptographic keys)
|
||||||
#
|
#
|
||||||
|
# **Only for direct use by cryptographic library authors**
|
||||||
#
|
#
|
||||||
|
# For all other applications use a preexisting class that include `Crypto::Secret`
|
||||||
@[Experimental]
|
@[Experimental]
|
||||||
module Crypto::Secret
|
module Crypto::Secret
|
||||||
abstract def to_slice : Bytes
|
abstract def to_slice : Bytes
|
||||||
@ -8,14 +10,26 @@ module Crypto::Secret
|
|||||||
def readwrite
|
def readwrite
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def readwrite
|
||||||
|
yield
|
||||||
|
end
|
||||||
|
|
||||||
def readonly
|
def readonly
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def readonly
|
||||||
|
yield
|
||||||
|
end
|
||||||
|
|
||||||
def noaccess
|
def noaccess
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def noaccess
|
||||||
|
yield
|
||||||
|
end
|
||||||
|
|
||||||
def wipe
|
def wipe
|
||||||
# Todo: implement wiping
|
# Todo: implement wiping. Needs crystal support
|
||||||
end
|
end
|
||||||
|
|
||||||
def wipe
|
def wipe
|
Loading…
Reference in New Issue
Block a user