Hello all, I have a client with an older Rails 1.8 app (was recently
upgraded from 1.6) and I need to integrate a php site to use the same
user login creds.

I'm not very versed with Ruby but I think this is the code that
encrypts the password.

[code]
  # Encrypts some data with the salt.
  def self.encrypt(password, salt)
    Digest::SHA1.hexdigest("--#{salt}--#{password}--")
  end

  # Encrypts the password with the user salt
  def encrypt(password)
    self.class.encrypt(password, salt)
  end[/code]

So.... I have full db access so I have the encrypted passwords and
their associated salts.  And I need a php script to verify users.  Is
there as way for me to un-encrypt this password via php and the
database that Ruby is using?

Thanks in advance for any guidance or assistance you may be able to
provide.

-- 
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