Go to file
Didactic Drunk c00910a6b2 Github actions 2021-06-12 19:57:37 -07:00
.github/workflows Github actions 2021-06-12 19:57:37 -07:00
spec Rename crypto_secret to crypto-secret 2021-06-12 19:57:37 -07:00
src/crypto-secret Rename crypto_secret to crypto-secret 2021-06-12 19:57:37 -07:00
.editorconfig Init 2021-06-12 16:03:59 -07:00
.gitignore Init 2021-06-12 16:03:59 -07:00
LICENSE Init 2021-06-12 16:03:59 -07:00
README.md Github actions 2021-06-12 19:57:37 -07:00
shard.yml Rename crypto_secret to crypto-secret 2021-06-12 19:57:37 -07:00

README.md

crypto-secret.cr

Crystal CI GitHub release GitHub commits since latest release (by date) for a branch Docs

Interface intended to hold sensitive information.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      crypto-secret:
        github: didactic-drunk/crypto-secret
    
  2. 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

  1. Fork it (https://github.com/your-github-user/crypto-secret/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors