How to compare in python an input value with an hashed value in mysql table?
admin at formationgrowthhacking.com writes:
> I have a wordpress 5.3 websites which sell a software with license key.
> The license key is encrypted and stored in Mysql table. there are 2 columns "license" and "hash":
> My python program get an input for user (the license key in string without any encrypton) and need to compare it with the official license key stored in Mysql database of our Wordpress website.
> I read a lot of hashlib python, functions and methods. But I didn't find anywhere how could I "hash" the string input typed by user with some hash values from the table, in order to compare both values (the input license and the license stored in mysql table).
Contact the person responsible for the data in your database.
Ask him which hashing algorithm should be used to verify the
license info provided by a user against the database info.
Note: there are many different hashing functions (e.g. "md5", "sha1",
"sha256", ...) and often their use involves an additionl secret
(besides the hashed data). Best get those details from a
knowledgable person than from us.