0.0
No commit activity in last 3 years
No release in over 3 years
Sometimes you just want to send some data to untrusted environments. But how to do this safely? The trick involves signing. Given a key only you know, you can cryptographically sign your data and hand it over to someone else. When you get the data back you can easily ensure that nobody tampered with it.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 2.0.1
~> 3.12
~> 1.2.8

Runtime

>= 1.6.0
 Project Readme

#It's Dangerous to go alone take this...

Build Status

This is a port of Python's itsdangerous to Ruby

###Examples

  require 'itsdangerousr'

  serializer = Itsdangerousr::URLSafeSerializer.new('super secret key')

  payload = {:message => 'Keep it secret, keep it safe', :status => 'ok'}

  result = serializer.dumps(payload)

  puts result

  # "eyJtZXNzYWdlIjoiS2VlcCBpdCBzZWNyZXQsIGtlZXAgaXQgc2FmZSIsInN0YXR1cyI6Im9rIn0.nzD92ZMbV52tUW-yp9IWTKqYHRo"

  decoded = serializer.loads(result)

  puts decoded

  # {:message=>"Keep it secret, keep it safe", :status=>"ok"}

Contributing to itsdangerousr

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2014 Marcus McCurdy. See LICENSE.txt for further details.