Closed zhy2020 closed 1 year ago
Hi @zhy2020 there's a wolfssl test that includes SHA1 hashes. See the int sha_test(void) in test.c.
Let me know if that helps. If you encounter any problems, you can open an issue there and I can help you further.
Hi @zhy2020 there's a wolfssl test that includes SHA1 hashes. See the int sha_test(void) in test.c.
Let me know if that helps. If you encounter any problems, you can open an issue there and I can help you further.
thanks.
Hi, how do I use this library to implement the following python code?
from cryptography.hazmat.primitives import hashes vin = bytes("5YJ3E1EA1KF000000", "UTF8")
Create A SHA1 Hasher
digest = hashes.Hash(hashes.SHA1())
Put VIN Into The Hasher
digest.update(vin)
Set vinSHA To The Hex String Of The VIN Hash
vinSHA = digest.finalize().hex()
Get The First 16 Characters
middleSection = vinSHA[0:16] print(middleSection) # a6bab0d54ffaecf1