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) # 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