Coder Social home page Coder Social logo

eniehack / branca.cr Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 27 KB

[Mirror from GitLab] branca(https://github.com/tuupola/branca-spec) implemention for crystal-lang.

Home Page: https://gitlab.com/eniehack/branca.cr

License: Apache License 2.0

Crystal 100.00%
branca shards crystal

branca.cr's Introduction

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

branca.cr's People

Contributors

eniehack avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.