Giter Site home page Giter Site logo

ectoken-ruby's Introduction

Verizon Edge Cast Token

Encryptor/decryptor for Verizon's ectoken

Installation

Add this line to your application's Gemfile:

gem 'verizon_token'

And then execute:

$ bundle

Or install it yourself using:

$ gem install verizon_token

Usage

This program can encrypt and decrypt Verizon Edge Cast token:

require "ectoken"

key = "0c8e886bc361f6f2fd3f29facc6eddgl48e2c6f19e49c85ac738c69a25f70581"

token = EdgeCastToken::Token.encrypt(key, "ec_expire=1596103200&ec_url_allow=/images/")
puts token

decrypted = EdgeCastToken::Token.decrypt(key, decrypted)
puts decrypted

You can also use the command line tool:

Encrypt

ectoken -k <key> -t <parameters>

Read the docs for available parameters.

Decrypt

ectoken -k <key> -t <encrypted token> -d

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/globocom/ectoken-ruby

ectoken-ruby's People

Contributors

mauricioabreu avatar

Stargazers

 avatar  avatar  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.