Need Equivalent Python Script from JS
Need Equivalent of SHA1 function in python Question: Please help me convert below JS code to Python. const di_digest = CryptoJS.SHA1(di_plainTextDigest).toString(CryptoJS.enc.Base64); di_plainTextDigest is a String. I tried a few Python methods, but not working. Example result = hashlib.sha1(di_plainTextDigest.encode()) hexd = result.hexdigest() hexd_ascii = hexd.encode("ascii") dig2 = base64.b64encode(hexd_ascii) dig3 = dig2.decode("ascii") print(dig3 ) Asked By: Prudhvi …