.editorconfig | ||
.gitignore | ||
LICENSE | ||
README.md | ||
shard.yml |
crypto_secret.cr
Interface intended to hold sensitive information.
Installation
-
Add the dependency to your
shard.yml
:dependencies: crypto_secret: github: didactic-drunk/crypto_secret
-
Run
shards install
Usage
require "crypto_secret/not"
not_secret = Crypto::Secret::Not.new 32
Implementing a new Secret holding class
Intended for use by crypto library authors
class MySecret
include Crypto::Secret
def initialize(size)
# allocate storage
# optionally mlock
end
def to_slice : Bytes
# Return a slice
# Slice.new pointer, size
end
# optionally override [noaccess, readonly, readwrite]
end
Contributing
- Fork it (https://github.com/your-github-user/crypto_secret/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- simple - creator and maintainer
- didactic-drunk - current maintainer