Crypto::Secret
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 includes Crypto::Secret
Which class should I use?
Crypto::Secret::Key- Use with small (<= 4096 bytes) keysCrypto::Secret::Large- Use for decrypted data that may stress mlock limitsCrypto::Secret::Not- Only use when you're sure the data isn't secret. 0 overhead. No wiping.
Other shards may provide additional Secret types (sodium.cr)
Instance methods
bytesize
Sourcedup
Sourcefinalize
Sourcenoaccess
Makes a region allocated inaccessible depending on implementation. It cannot be read or written, but the data are preserved.
reset
SourceMacros
delegate_to_bytesize(to object)
Sourcedelegate_to_slice(to object)
Source