Skip to content Skip to sidebar Skip to footer

Asp.net Encrypted Membership Password & Username Retrieval

I can't seem to find out how I should decrypt the encrypted password using sha1 via the membership provider. I can't use the .GetPassword() method here because I'm retrieving the v

Solution 1:

SHA1 is a hashing algorithm, not an encryption algorithm, and hashes are by definition one way, so they cannot be undone. as such you would never use sha to "decrypt" anything, let alone a hash.

your data appears to be encrypted by AES, not sha. also you are confusing encoding with encryption. Here is some infomation about using AES in .net: http://msdn.microsoft.com/en-us/library/system.security.cryptography.aes.aspx

encoding is all about interpreting byte data as characters in one scheme or another (ascii, unicode, UCT-8) so once you have the data decrypted, you may have to encode it into a string for display, but that is secondary to the decryption.

ADDENDUM: you may not be able to avoid using membership.GetPassword() since the encryption key in use in your membership DB implementation may not be retrievable. have you considered using an object datasource instead? then you could prefill a list of entries in code using .GetPassword() and bind them to the grid.

Post a Comment for "Asp.net Encrypted Membership Password & Username Retrieval"