README.md: Switch Not to Bidet
parent
b765a56073
commit
437b3da6b1
|
@ -39,11 +39,11 @@ Secret providers may implement additional protections via:
|
||||||
|
|
||||||
|
|
||||||
```crystal
|
```crystal
|
||||||
require "crypto-secret/not"
|
require "crypto-secret/bidet"
|
||||||
|
|
||||||
# `Not` isn't actually a secret and does none of what the comments say
|
# Bidet is a minimal but fast secret implementation
|
||||||
# Replace `Not` with a secure implementation like [Sodium::SecureBuffer](https://didactic-drunk.github.io/sodium.cr/master/Sodium/SecureBuffer.html)
|
secret = Crypto::Secret::Bidet.new 32
|
||||||
secret = Crypto::Secret::Not.new 32
|
# Don't forget to wipe!
|
||||||
secret.wipe do
|
secret.wipe do
|
||||||
secret.readonly do |slice|
|
secret.readonly do |slice|
|
||||||
# May only read slice
|
# May only read slice
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
require "./secret"
|
require "./not"
|
||||||
require "./*"
|
require "./bidet"
|
||||||
|
|
Loading…
Reference in New Issue