c00910a6b2 | ||
---|---|---|
.github/workflows | ||
spec | ||
src/crypto-secret | ||
.editorconfig | ||
.gitignore | ||
LICENSE | ||
README.md | ||
shard.yml |
README.md
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
- didactic-drunk - current maintainer