We have a table that a column is going to be used for passwords. This column is a nvarchar(255). We came upon HASHBYTES. When we update the table we SELECT HASHBYTES('SHA1', 'ExpertExchange')
UPDATE TableName SET pwd=HASHBYTES('SHA1', 'ExpertExchange') WHERE UserID='JohnDoe'
When it updates, the value sent to the table is '0x8E054939FFEE22BFC46C7A381543148713EC3EFC
'. The problem we have is how do we decipher the value in order to compare it against an entry by a user.
We want EE opinion if we are in the right direction and EE opinion on how to go about correct so we can save to the table and be able to interprets the value back as what the user entered via their apps.