Python Forum
how can I generate a password in hashlib
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how can I generate a password in hashlib
#3
its 'sha256'
as I found out from web, I should encode the value in the dictionary
I have tried
hashlib.sha256("a".encode('utf-8')).hexdigest()
and I reach
Quote:<sha256 HASH object @ 0x00000246AA5E1DC8>
from this point I can not go further. I dont know what to do.

as I know from the question I should use a loop from 1000 to 9999 and decode the value of the dictionary.

they used this process to generate that hash. and now I should do it in reverse process.

#for  peter,5104
import hashlib

def encrypt_string(hash_string):
    sha_signature = \
        hashlib.sha256(hash_string.encode()).hexdigest()
    return sha_signature
hash_string = '5104'
sha_signature = encrypt_string(hash_string)
print(sha_signature)
the output is:
Quote:99b057c8e3461b97f8d6c461338cf664bc84706b9cc2812daaebf210ea1b9974
Reply


Messages In This Thread
RE: how can I generate a password in hashlib - by go127a - May-06-2019, 02:28 PM
writing on csv file problem, python - by go127a - May-14-2019, 12:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] How to crack hash with hashlib Milan 0 1,543 Mar-09-2023, 08:25 PM
Last Post: Milan
  Python3 hashlib ogautier 1 1,633 Mar-28-2022, 04:42 AM
Last Post: snippsat
  Confusion about Hashlib Vysero 2 3,090 Jun-25-2018, 04:05 PM
Last Post: DeaD_EyE
  Using SHA3 (keccak) from Hashlib CryptoFlo 0 7,906 Mar-14-2018, 10:56 AM
Last Post: CryptoFlo

Forum Jump:

User Panel Messages

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