From: Jeremy Hinegardner Date: 2007-01-28T14:48:03+09:00 Subject: Re: [ANN] keybox 1.1.0 Released On Sun, Jan 28, 2007 at 02:08:22PM +0900, Daniel Berger wrote: > > I've been using dbi-dbrc to store database login/passwords in the past, > but they aren't encrypted (just protected via perms). I may have to use > this if the API is friendly (I've only looked at the demo so far). :) I think the documentation for Keybox is pretty good, but feel free to call me on it. Its all on the website as rdoc, You'll probably want to look at the Storage::Container documentation. http://keybox.rubyforge.org/rdoc/index.html Here's a quick script to give you an idea of what you could do to roll your own encrypted storage container using keybox. % cat embedded_container.rb require 'keybox' include Keybox PASSPHRASE = "passphrase" DB_PATH = "/tmp/database.yaml" container = Storage::Container.new(PASSPHRASE,DB_PATH) # use the already existing HostAccountEntry container << HostAccountEntry.new("My DB Login", "db.example.com", "dbmanager", "a really good password") container.save # pretend we're in a different part of a program, or another program c2 = Storage::Container.new(PASSPHRASE,DB_PATH) # iterate over results c2.find("example").each do |c| puts c end puts "=" * 20 # or we just now we want the first one found puts c2.find(/com/).first Let me know if you have any specific questions or approaches. And if you have some requests for specific API's or functionality let me know. And patches are always good. enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner jeremy@hinegardner.org