Add Crystal Digest overrides
This commit is contained in:
parent
a2040b54e2
commit
388f4a3c7f
13
src/crypto-secret/crystal.cr
Normal file
13
src/crypto-secret/crystal.cr
Normal 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
|
@ -1,5 +1,6 @@
|
|||||||
require "./lib"
|
require "./lib"
|
||||||
require "./class_methods"
|
require "./class_methods"
|
||||||
|
require "./crystal"
|
||||||
|
|
||||||
# Interface to hold sensitive information (often cryptographic keys)
|
# Interface to hold sensitive information (often cryptographic keys)
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user