Add Crystal Digest overrides

master
Didactic Drunk 2022-07-18 01:36:48 -07:00
parent a2040b54e2
commit 388f4a3c7f
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
abstract class Digest
def update(data : Crypto::Secret)
data.readonly do |slice|
update slice
end
end
def final(data : Crypto::Secret)
data.readwrite do |slice|
final slice
end
end
end

View File

@ -1,5 +1,6 @@
require "./lib"
require "./class_methods"
require "./crystal"
# Interface to hold sensitive information (often cryptographic keys)
#