From: Shashank Agarwal Date: 2008-08-08T22:22:53+09:00 Subject: Re: storing encrypted password in to database Rick Fiorentino wrote: > Pragash Mr. wrote: >> Hi, >> I want to store encrypted password in to database.... >> If you have any solution plz reply >> >> Thanx in advance > > > hash_pw = Digest::MD5.hexdigest(params[:name] + params[:password]) > > Using the unique login name and password eliminates duplicates if a > couple users decide to use the same password. Like MD5, there's SHA1 as well. You'll be fine using either with salting. Digest::SHA1.hexdigest(string) -- Posted via http://www.ruby-forum.com/.