I have a script in python that takes a salt and returns proof using sha256.
I do not know very much about javascript, or about any of the libraries.
import sys
from hashlib import sha256
def generate_proof(salt):
secret_salt = SECRET + salt
hexadecimal = secret_salt.decode('hex')
proof = sha256(hexadecimal).hexdigest()
return proof
Could someone please translate or explain how I can translate this method into javascript?
I think my biggest problem is finding the sha256 equivalent library in JS.