We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from pycoin.ecdsa import generator_secp256k1, sign, verify import hashlib, secrets
def sha3_256Hash(msg): hashBytes = hashlib.sha3_256(msg.encode("utf8")).digest() return int.from_bytes(hashBytes, byteorder="big")
def signECDSAsecp256k1(msg, privKey): msgHash = sha3_256Hash(msg) signature = sign(generator_secp256k1, privKey, msgHash) return signature
def verifyECDSAsecp256k1(msg, signature, pubKey): msgHash = sha3_256Hash(msg) valid = verify(generator_secp256k1, pubKey, msgHash, signature) return valid
i think the example code is broken or outdated. i cant import sign or verify at all
The text was updated successfully, but these errors were encountered:
download https://github.com/richardkiss/pycoin/releases/tag/0.70 and do
pip3 install pycoin-0.70.tar
Sorry, something went wrong.
No branches or pull requests
from pycoin.ecdsa import generator_secp256k1, sign, verify
import hashlib, secrets
def sha3_256Hash(msg):
hashBytes = hashlib.sha3_256(msg.encode("utf8")).digest()
return int.from_bytes(hashBytes, byteorder="big")
def signECDSAsecp256k1(msg, privKey):
msgHash = sha3_256Hash(msg)
signature = sign(generator_secp256k1, privKey, msgHash)
return signature
def verifyECDSAsecp256k1(msg, signature, pubKey):
msgHash = sha3_256Hash(msg)
valid = verify(generator_secp256k1, pubKey, msgHash, signature)
return valid
i think the example code is broken or outdated. i cant import sign or verify at all
The text was updated successfully, but these errors were encountered: