Jump to content

getting the username...


jimfog

Recommended Posts

Is there a way I can get a username back after it's been hashed with sha1?

Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...