Note: password hashing is not intended for two-way encryption (where the jail can decrypt it). It is designed to hash it in such a way as to allow verification without trivial display of the password to anyone. A low or even moderate level of collisions is in some ways desirable , so it allows you to use a password (and, unfortunately, other options) , but in collisions, you can never say what the real password really was.
A simple implementation would be to launch HashBytes with a password. You are comparing (hash) the password provided by the hash. If someone does not have a rainbow table, they will not be able to find the original password.
INSERT INTO <tbl> (..., passwd) values (...., HashBytes('SHA1', @password))
When checking passwords, you accept a password hash
SELECT HashBytes('SHA1', @password);
And compare it to the entrance.
RichardTheKiwi
source share