README.md: Fix link to "What class should I use?"

master
Didactic Drunk 2021-06-17 09:41:52 -07:00
parent 973e1ecb4b
commit 363800bf1a
3 changed files with 8 additions and 8 deletions

View File

@ -9,7 +9,7 @@ Secrets hold sensitive information
The Secret interface manages limited time access to a secret and securely erases the secret when no longer needed. The Secret interface manages limited time access to a secret and securely erases the secret when no longer needed.
Multiple `Secret` classes exist. Most of the time you shouldn't need to change the `Secret` type - the cryptographic library should have sane defaults. Multiple `Secret` classes exist. Most of the time you shouldn't need to change the `Secret` type - the cryptographic library should have sane defaults.
If you have a high security or high performance application see [which secret type should I choose?]() If you have a high security or high performance application see [which secret type should I use?](https://didactic-drunk.github.io/crypto-secret.cr/main/Crypto/Secret.html)
Secret providers may implement additional protections via: Secret providers may implement additional protections via:
* `#noaccess`, `#readonly` or `#readwrite` * `#noaccess`, `#readonly` or `#readwrite`

View File

@ -1,7 +1,7 @@
require "./bidet" require "./bidet"
module Crypto::Secret module Crypto::Secret
# Use this class for holding small amounts of sensitive data such as encryption keys # Use this class for holding small amounts of sensitive data such as crypto keys
# #
# Underlying implentation subject to change # Underlying implentation subject to change
# #

View File

@ -7,12 +7,12 @@ require "./class_methods"
# #
# For all other applications use a preexisting class that includes `Crypto::Secret` # For all other applications use a preexisting class that includes `Crypto::Secret`
# #
# # Which class should I use? # ## Which class should I use?
# * Crypto::Secret::Key - Use with small (<= 4096 bytes) keys # * `Crypto::Secret::Key` - Use with small (<= 4096 bytes) keys
# * Crypto::Secret::Large - Use for decrypted data that may stress mlock limits # * `Crypto::Secret::Large` - Use for decrypted data that may stress mlock limits
# * Crypto::Secret::Not - Won't get wiped but 0 overhead. Only use when you're sure the data isn't secret # * `Crypto::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) # Other shards may provide additional `Secret` types ([sodium.cr](https://github.com/didactic-drunk/sodium.cr))
@[Experimental] @[Experimental]
module Crypto::Secret module Crypto::Secret
class Error < Exception class Error < Exception
@ -112,7 +112,7 @@ module Crypto::Secret
end end
end end
def wipe_impl(slice : Bytes) : Nil protected def wipe_impl(slice : Bytes) : Nil
slice.wipe slice.wipe
end end
end end