Python Forum
How to compare in python an input value with an hashed value in mysql table?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to compare in python an input value with an hashed value in mysql table?
#1
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":

license_key
def50200352f5dc4bd8181a9daebbf4f9177fe725111a5a479d64636d01c2a10074e0c645abe898dea18210af563a5334288420551ab61c18ca4506cd03aa5d2bdd40933ddf7ca4d4b61b1c0f58a3830cbe0891cf4ff526311d5d637a55a574eca2c3a1b487b56

hash 9498cbf8bf00d6c55e31f98ba6d8294afa3127a84f31aa622c4158ac7377c6dd

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).

This topic To SHA512-hash a password in MySQL database by Python gave me a lot of information but didn't fix my issue.

Anyone has any odea how to proceed?

Thanks
Reply


Messages In This Thread
How to compare in python an input value with an hashed value in mysql table? - by Formationgrowthhacking - Jan-14-2020, 05:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Mysql and mysql.connector error lostintime 2 687 Oct-03-2023, 10:25 PM
Last Post: lostintime
  Mysql Workbench table not updated CatBall 2 1,116 Feb-13-2023, 05:37 PM
Last Post: CatBall
Photo How to select NULL and blank values from MySQL table into csv python300 9 2,451 Dec-27-2022, 09:43 PM
Last Post: deanhystad
  Mysql error message: Lost connection to MySQL server during query tomtom 6 16,119 Feb-09-2022, 09:55 AM
Last Post: ibreeden
Question Debian 11 Bullseye | Python 3.9.x | pip install mysql-connector-python-rf problems BrandonKastning 4 6,692 Feb-05-2022, 08:25 PM
Last Post: BrandonKastning
  Compare two Excel sheets with Python and list diffenrences dmkfon 1 14,663 Oct-09-2021, 03:30 PM
Last Post: Larz60+
  SaltStack: MySQL returner save less data into Database table columns xtc14 2 2,179 Jul-02-2021, 02:19 PM
Last Post: xtc14
  Python and MySql ogautier 8 3,371 May-20-2021, 11:10 PM
Last Post: Pedroski55
  Python and MySQL Pedroski55 5 3,245 Mar-23-2021, 06:40 AM
Last Post: ndc85430
  "'DataFrame' objects are mutable, thus they cannot be hashed" Mark17 1 6,841 Dec-25-2020, 02:31 AM
Last Post: tinh

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020