View Single Post
  #3 (permalink)  
Old 06-17-2008, 06:58 PM
rgenter
Guest
 
Posts: n/a
Question Encrypted passwords?

Thanks for your reply.

I have this mostly working, except that I can't get encrypted passwords to work. My understanding is that when a password is encrypted its MD5 hash should be stored in the database. I've tried storing both

HASHBYTES('MD5', password)

(which is a VARBINARY cast to VARCHAR) and an ASCII representation of the resulting binary string. In other words, I've tried both the equivalent of

CAST(0x123456789A.... AS VARCHAR(32))

and

'123456789A.....'

Neither of these worked. How should I store a password such that I can set Encrypted to 1 and have it work?
Reply With Quote