http://www.catb.org/~esr/faqs/smart-questions.html

Don't post homework (or worse, commercial work) problems, because we 
won't do them for you.

The documentation for ruby openssl can be found by typing "ruby openssl" 
into Google (it's the first hit)

Example code can be found in the ruby distribution tarball in the 
sample/openssl directory, or at 
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/sample/openssl/ 
on the web.

The Ruby openssl code is just a very thin wrapper around the openssl 
library, so openssl's C API documentation will tell you everything you 
need to know.

Then start writing code. Then when you have a specific problem, come 
back here. Narrow down the problem until you find a few lines of your 
Java code which produce a different result to the Ruby code you have 
written.

Adding debugging output to show that the conditions are the same in both 
pieces of code *before* this snippet runs, but different *after* it 
runs. Then if you can't work out why one behaves differently to the 
other, post the two pieces of code here together with the start and end 
debugging output.
-- 
Posted via http://www.ruby-forum.com/.