I’m trying to create the same sha1 hash as the sha1 hash generated in Mariadb for equality look ups.
I’ve tried this:
import hashlib
columns = ["one", "two", "three"]
column_str = ",".join(columns)
result = hashlib.sha1(column_str.encode()).hexdigest()
But the result does not give the same hash as Mariadb generated hash.
Why am I not getting the same result?
P.S.
I’ve also converted the column to use the UTF8 character set.