You can use one of the Ruby digest package:
http://www.ruby-doc.org/stdlib/libdoc/digest/rdoc/index.html

For example, if you want to digest a password with SHA 512:

require 'digest/sha2'

Digest::SHA2.hexdigest('password', 512)

Regards.

Franco Catena.

On May 8, 6:18 pm, Lakridserne <[email protected]> wrote:
> Hi,
>
> I know that there is a way to encrypt passwords, but what would be the
> easiest?
> For example you have 2 functions in php. You use them by calling:
>
> fuction("data-to-be-encrypted-here");
>
> But is there a similar way in ruby on rails?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to