GithubHelp home page GithubHelp logo

bhanditz / ruby_rncryptor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from workato/ruby_rncryptor

0.0 2.0 0.0 9 KB

Ruby implementation of RNCryptor format

License: MIT License

Ruby 100.00%

ruby_rncryptor's Introduction

Ruby RNCryptor

This is a Ruby port of Rob Napier's Cocoa RNCryptor library. Like RNCryptor, Ruby RNCryptor intends to be an easy-to-use class that correctly handles random initialization vectors, password stretching with PBKDF2, and HMAC verification.

This port is based on his Data Format wiki page. It currently implements version 2 and version 3.

Usage Example:

require './lib/ruby_rncryptor'
require "base64"

password = "n3v3r gue55!!"
encrypted = RubyRNCryptor.encrypt("This is a tiny bit of text to encrypt", password)

puts Base64.encode64(encrypted)
puts "Decrypting..."

decrypted = RubyRNCryptor.decrypt(encrypted, password)

puts decrypted

Release Notes

2017-04-01 - version 3.0.2

  • Fixed for OpenSSL deprecation warning.

2016-01-25 - version 3.0.1

  • Addressed a timing attack vulnerability by making the HMAC comparison constant time.
  • Updated the tests to use the newer rspec expect syntax.

2013-12-20 - version 3.0

  • Generates version 3 file format files by default.
  • Made a gemspec for this library, version 3.0 for file format version 3.
  • Decrypts files encrypted with a bug in the Cocoa version where multibyte passwords were truncated.

Generate and install as a gemfile

gem build ruby_rncryptor.gemspec
gem install ./ruby_rncryptor-3.0.1.gem

Credits

  • Ruby port by Erik Wrenholt 2013.
  • Original RNCrypto library and format are by Rob Napier.

ruby_rncryptor's People

Contributors

timestretch avatar n00ge avatar klaaspieter avatar

Watchers

James Cloos 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.