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 15223 time(s), 5 post(s) 03.10.2013 15:00:38by livcons
livcons

livcons

03.10.2013 15:00:38
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!
Dieser Inhalt wurde noch nicht bewertet. 
986 Reputation 121 Total posts
pajo

pajo

03.10.2013 15:32:54
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.
Dieser Inhalt wurde noch nicht bewertet. 
629 Reputation 83 Total posts
livcons

livcons

03.10.2013 15:46:55
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?
Dieser Inhalt wurde noch nicht bewertet. 
986 Reputation 121 Total posts
pajo

pajo

03.10.2013 15:51:26
Yes, it's correct.
Dieser Inhalt wurde noch nicht bewertet. 
629 Reputation 83 Total posts
livcons

livcons

03.10.2013 15:56:24
Thank you!
Dieser Inhalt wurde noch nicht bewertet. 
986 Reputation 121 Total posts