Jump to content

[SOLVED] encrypting/decrypting strings


mike1313

Recommended Posts

So I want to encrypt user passwords on registration but I want to be able to decrypt the same password so if the user loses their password that can run password recovery what is a good function on this or should I create a custom function, since md5 and shai1 are out of the picture here since they are 1 way encryption.

Link to comment
Share on other sites

An after-thought... you want to ensure against malicious password resets, so the process should be:

 

1. User requests a password reset

2. System emails the account on record with an auth code for the password reset.

3. User retrieves email, and responds to the auth code challenge.

4. System generates a new password, and stores it md5'd.

5. New email sent to account on record with the new password.

6. User logs in with the temporary password and changes password to whatever they want from their profile page.

 

PhREEEk

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.