Search code examples
sqlasp.net-membership

what hash type sqlmembership provider use


my problem is when I created my login page, I used membership provider.but I forget my password.I can see the my passpord hashed on sql server,but need to reverse that hashed code.or someone tell me what is the number 1 as a hashed format.I will change my password with the 1 which is hashed.


Solution

  • You cannot reverse the hash. It is a one-way encryption. The password that is encrypted is never decrypted, the membership provider just compares the salt.

    This is how it works:

    1. User creates a password
    2. Membership Provider adds the salt value to the password i.e., "mypassword" + "saltvalue"
    3. This string is then encrypted using the machine key.
    4. The salt value and the result of the encryption is stored in the database.
    5. When user attempts to login - their password attempt is added to the salt value and encrypted - if the encrypted value matches the value stored in the DB - then the user is authenticated.