Hi Amanda

If you want to save a MD5 hash of your password in the database, James has suggested

require 'digest/sha1'
encrypted_password = Digest::SHA1.hexdigest(password)

That's all you need. You may also want to read up on authentication in Rails and look at the plugin acts_as_authenticated (http://wiki.rubyonrails.com/rails/pages/Acts_as_authenticated).

Neuman Vong
Ext: 6036


-----Original Message-----
From: a.etherton / hotmail.com [mailto:a.etherton / hotmail.com]
Sent: Thursday, 28 August 2008 4:05 AM
To: ruby-talk ML
Subject: Re: encrypting password on form submit?

Amanda .. wrote:
>
> Thats what I'm not sure about/don't know how to do...I was hoping for
> some simple way to submit WD5(:password) to the database or something
> like that...I'm not very experienced with RoR or databases, so that's
> why I'm having a hard time with this

I was hoping for something like what's outlined here:

http://www.bluehostforum.com/showthread.php?t=176

but that I can do in Ruby instead of PHP
--
Posted via http://www.ruby-forum.com/.


Information contained in this communication (including any attachments) is confidential and may be privileged or subject to copyright.  If you have received this communication in error you are not authorised to use the information in any way and Optiver requests that you notify the sender by return email, destroy all copies and delete the information from your system.  Optiver does not represent, warrant or guarantee that this communication is free from computer viruses or other defects or that the integrity of this communication has been maintained.  Any views expressed in this communication are those of the individual sender.  Optiver does not accept liability for any loss or damage caused directly or indirectly by this communication or its use.

Please consider the environment before printing this email.