Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7007945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:40:21+00:00 2026-05-27T21:40:21+00:00

Given that I know the hashed password, salt & original password generated with Authlogic

  • 0

Given that I know the hashed password, salt & original password generated with Authlogic (ruby on rails gem).

Is it possible in PHP devise a function to check if a users password matches the users Ruby Authlogic hashed_pw in the DB? I need to integrate an existing PHP app with the ruby app without resetting all the Ruby users passwords.

I tried something like below but it didn’t seem to work

function passwordhash($password, $salt)
{
 return hash('sha512', "{$password}:{$salt}");
}
echo passwordhash("orange","NsxUt51YVzK4dFeVJOj");
output: 7b4a69291354dc3591e490f47f29d5a4a4b6d7faa23d01a1ee595b917526b65e2dda48e978c46b81dde0269adc3f853a36c075d236eb89c8f6b21811fe3da1bb

The DB info is

crypted_password 
f777c545bf9844faaa5f3b129e77e4199539793d907e397ddc97d1bb747a30d402201bd11ed9ca0eaecbf3b9652b314aa919d65904c64d4169ce0e1ac1c526a4

password_salt
NsxUt51YVzK4dFeVJOj

real password
orange

It seems like this should be possible what am I missing?

Thanks,
Ryan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:40:22+00:00Added an answer on May 27, 2026 at 9:40 pm

    My perusal of the authlogic code suggests 2 things:

    • It doesn’t use : to separate the password from the salt (i.e. the first string to be digested is orangeNsxUt51YVzK4dFeVJOj
    • It does a sha512 digest on the output of the first process and repeats this process 20 times

    The other thing is that authlogic supports a large number of hashing strategies – make sure that you’re trying to reimplement the correct one! It certainly looks like the 20 fold sha512 is the right one though.

    Link: https://github.com/binarylogic/authlogic/blob/master/lib/authlogic/crypto_providers/sha512.rb

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that it's not possible to style any given PHP but I do
Given that I don't know at deployment time what kinds of system my code
If I am given a MemoryStream that I know has been populated with a
Given int a; , I know that the following returns the largest value that
Given two objected that do not contain reference loops within them, do you know
For the downvote fairies.. I know that php is the wrong language for this...
Given that I know how to set the .htaccess... So my user instead of
Does anyone know of any resources that can give me an idea of how
Given that indexing is so important as your data set increases in size, can
Given that Chrome and Safari use webkit has anyone yet found anything that renders

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.