Keys and openssl

I may be barking up the wrong tree altogether, but I’m trying to
generate a public and private key, optionally protected by a passphrase,
and use them to encrypt and decrypt a database password. Has anyone done
this in Ruby with OpenSSL? If so, would you mind gving me a few tips?

I’ve tried several things with no luck. The OpenSSL library for Ruby is
impressive, but poorly documented. :frowning: Any pointers would be appreciated.

···


Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/jamis

ruby -h | ruby -e
’a=[];readlines.join.scan(/-(.)[e|Kk(\S*)|le.l(…)e|#!(\S*)/) {|r| a <<
r.compact.first };puts “\n>#{a.join(%q/ /)}<\n\n”’