Move LibC to lib.cr
This commit is contained in:
parent
df977f18e8
commit
08c94c66a0
11
src/crypto-secret/lib.cr
Normal file
11
src/crypto-secret/lib.cr
Normal file
@ -0,0 +1,11 @@
|
||||
require "crypto/subtle"
|
||||
|
||||
lib LibC
|
||||
fun explicit_bzero(Void*, LibC::SizeT) : Void
|
||||
end
|
||||
|
||||
struct Slice(T)
|
||||
def wipe
|
||||
LibC.explicit_bzero to_unsafe, bytesize
|
||||
end
|
||||
end
|
@ -1,14 +1,4 @@
|
||||
require "crypto/subtle"
|
||||
|
||||
lib LibC
|
||||
fun explicit_bzero(Void*, LibC::SizeT) : Void
|
||||
end
|
||||
|
||||
struct Slice(T)
|
||||
def wipe
|
||||
LibC.explicit_bzero to_unsafe, bytesize
|
||||
end
|
||||
end
|
||||
require "./lib"
|
||||
|
||||
# Interface to hold sensitive information (often cryptographic keys)
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user