Go to file
Didactic Drunk a94415dc55 Init
2021-06-12 16:03:59 -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 Init 2021-06-12 16:03:59 -07:00
shard.yml Init 2021-06-12 16:03:59 -07:00

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

sodium.cr