MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

crypt passwords  (Mono Support )

Viewed 13949 time(s), 5 post(s) 10/3/2013 3:00:38 PMby livcons
livcons

livcons

10/3/2013 3:00:38 PM
Hello! I am trying to set MonoX to crypt passwords from clear to MD5. How can I do that? I tried to change passwordFormat to Hashed and hashAlgorithmType in <membership> to "MD5", but in SQL looks like is stored in Base64.

Thank you!
This content has not been rated yet. 
986 Reputation 121 Total posts
pajo

pajo

10/3/2013 3:32:54 PM
Hi,

You're right it's indeed encoded using Base64 encoding. If you look in the database password is of nvarchar type which is designed to store unicode characters while hash algorithms are working with byte arrays. My guess is MS decided to encode it to avoid any problems when storing and transferring hashed password. If you would decode password you would get hash byte array not plain password.
This content has not been rated yet. 
629 Reputation 83 Total posts
livcons

livcons

10/3/2013 3:46:55 PM
So the password is crypted in MD5 and the result is encoded in Base64? The way i used to crypt the password in MD5 is correct?
This content has not been rated yet. 
986 Reputation 121 Total posts
pajo

pajo

10/3/2013 3:51:26 PM
Yes, it's correct.
This content has not been rated yet. 
629 Reputation 83 Total posts
livcons

livcons

10/3/2013 3:56:24 PM
Thank you!
This content has not been rated yet. 
986 Reputation 121 Total posts