encryption using ruby?

N

Nick Hayworth

Hi all

I need to be able to encrypt/decrypt a small text file, but I'm struggling a
little finding an encryption library.

I found Jamis Buck's previous post about using openssl for encryption and
whilst it works, I can't make head nor tails of the openssl docs at
ruby-docs.org. I can't find any of the methods Jamis used in his code...
there only seem to be two of them for the cipher module.. ?
http://www.ruby-doc.org/stdlib/libdoc/openssl/rdoc/classes/OpenSSL/Cipher/Cipher.html

can anyone explain how the openssl library should be used please?

thanks
nick
 
J

James Britt

P

Pelle Braendgaard

It took me some time to figure it out myself. Ive got a small wrapper
library that I use to simplify my life. When I get home I will post a
blog entry with it and how it works.

For my new project https://stakeitout.com (blatant plug alert), I am
doing alot of crypto using the OpenSSL libraries.

I will submit most of this and my encrypting ActiveRecord wrapper to
rails in a few weeks time, when I have time to clean it up a bit.

Pelle

=20
See
=20
http://ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/144861
=20
for a pure-Ruby encryption lib.
=20
James
=20
--
=20
http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
=20
=20
=20


--=20
https://stakeitout.com + Stake out your own micro ventures
http://neubia.com + Geek blog
http://stakeventures.com + Bootstrapping blog
http://SoapBX.com + Get on the box and shout
 
P

Pelle Braendgaard

Just posted a really quick small example of doing AES encryption using open=
ssl :

http://stakeventures.com/articles/2005/06/16/crypto-in-ruby

Pelle

Hi all
=20
I need to be able to encrypt/decrypt a small text file, but I'm strugglin= g a
little finding an encryption library.
=20
I found Jamis Buck's previous post about using openssl for encryption and
whilst it works, I can't make head nor tails of the openssl docs at
ruby-docs.org. I can't find any of the methods Jamis used in his code...
there only seem to be two of them for the cipher module.. ?
http://www.ruby-doc.org/stdlib/libdoc/openssl/rdoc/classes/OpenSSL/Cipher= /Cipher.html
=20
can anyone explain how the openssl library should be used please?
=20
thanks
nick
=20
=20
=20
=20


--=20
https://stakeitout.com + Stake out your own micro ventures
http://neubia.com + Geek blog
http://stakeventures.com + Bootstrapping blog
http://SoapBX.com + Get on the box and shout
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top