I think that what I am going to ask is impossible, however, I thought it was worth doing it here.
We have an application that uses the functions PWDEncrypt and PWDCompare for SQL servers.
Part of the system creates duplicate users (the same login and password). Due to a system error, instead of copying the binary stored PWDEncrypt password, he executed another PWDEncrypt password. Therefore binary values ββdo not match.
Is it possible to find out if two binary values ββare hashes of the same password?
eg. PWDEncrypt ('abc') = PWDEncrypt ('abc')
If I can do this, it means that I can find out how many users this error actually affected, and not deal with thousands!
EDIT: To clarify, PWDEncrypt ('abc') = PWDEncrypt ('abc') will NOT return true, since passwords are hashed with different values.
So far I know that it is not possible to get the password from the hash, PWDCOMPARE ('abc', PWDENCRYPT ('abc')), so internally SQL Server has to do more than just hash the password that you are comparing, and check that the values ββare the same.
source share