Rails 1.8 password encryption php interpret?

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 into the same user login creds.

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

  # Encrypts some data with the salt.
  def self.encrypt(password, salt)

  # Encrypts the password with the user salt
  def encrypt(password)
    self.class.encrypt(password, salt)

So… I have full db access so I have the encrypted passwords and their associated salts. And I need my 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.

lol, isn’t it funny how right after you post the answer hits you right between the eyes?

This is just an sha1() hash being used. So php should be able to use the salt and the pw to create a hash with sha1() function. I guess the whole ‘hexdigest’ thing is what confused me.