The SQL Server table has encrypted password which used HASHBYTES('SHA2_512','password') for encrypting.
I used below python code for encrypting the password but the resulting hash values from SQL Server and the Python code do not match.
import hashlib# String to hashtext = 'Password@12345'# Calculate SHA-512 hashsha512_hash_bytes = hashlib.sha512(text.encode()).digest()# Convert hash bytes to hexadecimal stringsha512_hash_hex = sha512_hash_bytes.hex()How to match SQL Server HASHBYTES('SHA2_512') result and Python sha512 hashing results?
Please help me on this.