From 363800bf1a18d20cb1af0c320369c618248dbf00 Mon Sep 17 00:00:00 2001 From: Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com> Date: Thu, 17 Jun 2021 09:41:52 -0700 Subject: [PATCH] README.md: Fix link to "What class should I use?" --- README.md | 2 +- src/crypto-secret/key.cr | 2 +- src/crypto-secret/secret.cr | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 66b34d8..c9eda21 100644 --- a/README.md +++ b/README.md @@ -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. 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: * `#noaccess`, `#readonly` or `#readwrite` diff --git a/src/crypto-secret/key.cr b/src/crypto-secret/key.cr index 870fe85..3fb10e4 100644 --- a/src/crypto-secret/key.cr +++ b/src/crypto-secret/key.cr @@ -1,7 +1,7 @@ require "./bidet" 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 # diff --git a/src/crypto-secret/secret.cr b/src/crypto-secret/secret.cr index 594da2c..0b2c30c 100644 --- a/src/crypto-secret/secret.cr +++ b/src/crypto-secret/secret.cr @@ -7,12 +7,12 @@ require "./class_methods" # # 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) keys -# * 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 +# ## Which class should I use? +# * `Crypto::Secret::Key` - Use with small (<= 4096 bytes) keys +# * `Crypto::Secret::Large` - Use for decrypted data that may stress mlock limits +# * `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] module Crypto::Secret class Error < Exception @@ -112,7 +112,7 @@ module Crypto::Secret end end - def wipe_impl(slice : Bytes) : Nil + protected def wipe_impl(slice : Bytes) : Nil slice.wipe end end