Crypto::Secret Add protection method stubs

master
Didactic Drunk 2021-06-13 12:42:14 -07:00
parent c00910a6b2
commit de11459cb1
1 changed files with 15 additions and 1 deletions

View File

@ -1,6 +1,8 @@
# 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]
module Crypto::Secret
abstract def to_slice : Bytes
@ -8,14 +10,26 @@ module Crypto::Secret
def readwrite
end
def readwrite
yield
end
def readonly
end
def readonly
yield
end
def noaccess
end
def noaccess
yield
end
def wipe
# Todo: implement wiping
# Todo: implement wiping. Needs crystal support
end
def wipe