Categories: None [Edit]

ruby-mcrypt

https://rubygems.org/gems/ruby-mcrypt
https://github.com/kingpong/ruby-mcrypt
= Mcrypt - libmcrypt bindings for Ruby Mcrypt provides Ruby-language bindings for libmcrypt(3), a symmetric cryptography library. {Libmcrypt}[http://mcrypt.sourceforge.net/] supports lots of different ciphers and encryption modes. == You will need * A working Ruby installation (>= 1.8.6 or 1.9) * A working libmcrypt installation (2.5.x or 2.6.x, tested with 2.5.8) * A sane build environment == Installation Install the gem: gem install ruby-mcrypt --test -- --with-mcrypt-dir=/path/to/mcrypt/prefix If you're installing on Ubuntu: sudo apt-get install mcrypt libmcrypt-dev gem install ruby-mcrypt If you want to run the longer test suite, do this instead: MCRYPT_TEST_BRUTE=1 \ gem install ruby-mcrypt --test -- --with-mcrypt-dir=/path/to/mcrypt/prefix Put this in your code: require 'rubygems' require 'mcrypt' Or in Rails' environment.rb: gem "ruby-mcrypt", :lib => "mcrypt" == Usage crypto = Mcrypt.new(:twofish, :cbc, MY_KEY, MY_IV, :pkcs) # encryption and decryption in one step ciphertext = crypto.encrypt(plaintext) plaintext = crypto.decrypt(ciphertext) # encrypt in smaller steps while chunk = $stdin.read(4096) $stdout << crypto.encrypt_more(chunk) end $stdout << crypto.encrypt_finish # or decrypt: while chunk = $stdin.read(4096) $stdout << crypto.decrypt_more(chunk) end $stdout << crypto.decrypt_finish == Known Issues * Test coverage is lacking. If you find any bugs, please let the author know. == Wish List * IO-like behavior, e.g. crypto.open($stdin) { |stream| ... } == Author * Philip Garrett == Copyright and License Copyright (c) 2009-2013 Philip Garrett. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Softw...

Total

Ranking: 5,466 of 186,911
Downloads: 1,096,020

Daily

Ranking: 28,192 of 186,896
Downloads: 24

Depended by

RankDownloadsName
21,17170,449firebug
60,99216,367sermepa_web_tpv
61,57916,163netpayclient
148,0343,671sakide

Depends on

RankDownloadsName

Owners

#GravatarHandle
1iconkingpong