How to convet hexcode produced from SHA256 back to the SHA256 object ?
digest = SHA256.new() # digest empty
digest.update(str(data).encode()) # digest has string hashed
hex_code = digest.hexcode()
hexcode contains the digest of the data , now is there any way to convert the hexcode back to the SHA256 object ?
Is there any method to use the hexcode to generate the original digest object?
'print(digest) gives
<Crypto.Hash.SHA256.SHA256Hash object at 0x7fc2e2ea4da0>
print(digest.hexcode()) gives
bc273cf180e376f52d8c8a7f6b6ffd5babb872629e5fcc4685fe5284887faee'
Is there any way to use the digest.hexcode() and generate the hash object ?