Worked for me: CREATE TABLE #xTable ( ID INT IDENTITY(1,1) PRIMARY KEY, strPasswordII VARBINARY(MAX) )
INSERT INTO #xTable (strPasswordII) SELECT HASHBYTES('MD5',CONVERT(nvarchar,'password')) SELECT ID FROM #xTable WHERE strPasswordII = HASHBYTES('MD5',CONVERT(nvarchar,'password')) DROP TABLE #xTable Torrent Girl wrote: > Hello > > I have converted user passwords to a hash value using SQL hashbytes. > > When I go to test the login, the value of both the hashed value in the > database and the hashed user input value do not match. > > I am using a stored proc on the login and here is the SQL: > > SELECT @intMemberID=ISNULL((SELECT intMemberID FROM tblMembers WHERE > strusername...@strusername AND strPasswordII= > HashBytes('MD5',Convert(nvarchar,'@strPassword'))),0) > > The column in a varbinary(max) column. > > Any help would be greatly appreciated. > > Thanks > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3362 Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/sql/unsubscribe.cfm