def gen_pass_hash(password, salt):
try:
string_to_hash = password + salt
hash_obj = hashlib.sha256(str(string_to_hash).encode('utf-8'))
return True, hash_obj.hexdigest()
except IndexError:
return False, "Hashing Failure"
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter