jimfog Posted October 1, 2012 Share Posted October 1, 2012 Is there a way I can get a username back after it's been hashed with sha1? Link to comment Share on other sites More sharing options...
boen_robot Posted October 1, 2012 Share Posted October 1, 2012 No. The very point of hash algorithms like sha1() is that data hashed with it can't be decrypted back.You can (and should) store the username of a user in the session to recover it from there. Link to comment Share on other sites More sharing options...
jimfog Posted October 1, 2012 Author Share Posted October 1, 2012 It won't be needed to get the hashed username after all.I am going to take it fromthe database where there is a mapping of username-key, I will get the key from the cookie, and thiswill lead me to the username. All this is part of a "remember me" scheme-just to let you know. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now