branca

Version, currently 0.1.04 versions

gitlab.com/eniehack/branca.cr

[W.I.P] branca(https://github.com/tuupola/branca-spec) implemention for crystal-lang(https://crystal-lang.org).

0 stars
0 dependents
License: Apache-2.0

Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  branca:
    gitlab: eniehack/branca.cr
    version: ~> 0.1.0

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.1.0. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

branca-cr

Docs status Gitlab pipeline status

branca implemention for crystal-lang(https://crystal-lang.org).

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      branca:
        gitlab: eniehack/branca.cr
  2. Run shards install

Usage

encode tokens

require "branca"

config = Branca::Configuration.new ttl: 3600
branca = Branca::Token.new(config)
token = branca.encode "Hello world!".to_slice

decode tokens

require "branca"

config = Branca::Configuration.new ttl: 3600
branca = Branca::Token.new(config)
token = branca.decode("870S4BYxgHw0KnP3W9fgVUHEhT5g86vJ17etaC5Kh5uIraWHCI1psNQGv298ZmjPwoYbjDQ9chy2z")

Development

TODO: Write development instructions here

License

copyright (c) 2021 eniehack

This software is licensed under Apache License 2.0.

but, ./spec/test_vectors.jsonis provided from https://github.com/tuupola/branca-spec/blob/527997e1c954d450a503b12099652bbdf7fdb168/test_vectors.json , licensed by MIT/X11 License. so, this file is owned copyright by tuupola.

Contributing

  1. Fork it (https://gitlab.com/eniehack/branca-cr/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