In MySql, there is a function called Password() which hashes a string. Is there an equivalent in MS SQL?
Example of its hypothetical usage:
Example of its hypothetical usage:
Code:
DECLARE @is_valid_login bit;
IF EXISTS
(
SELECT [id]
FROM [Users]
WHERE [username] = @username
AND [b]Password([/b][password][b])[/b] = @password
) SET @is_valid_login = 1;
ELSE SET @is_valid_login = 0;