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
环境:
运行样例时报错:AttributeError: '_EllipticCurvePublicKey' object has no attribute 'encrypt'
AttributeError: '_EllipticCurvePublicKey' object has no attribute 'encrypt'
from tongsuopy.crypto import serialization from tongsuopy.crypto.asymciphers import ec msg = b"hello" key = ec.generate_private_key(ec.SM2()) pem = key.public_key().public_bytes( encoding=serialization.Encoding.PEM, format=serialization.PublicFormat.SubjectPublicKeyInfo, ) pubkey = serialization.load_pem_public_key(pem) ciphertext = pubkey.encrypt(msg) decrypt_text = key.decrypt(ciphertext) assert decrypt_text == msg
The text was updated successfully, but these errors were encountered:
因为1.0.1版本还不包含SM2加解密功能,所以敬请期待1.0.2版本发布,多谢!
Sorry, something went wrong.
期待(☆▽☆)
No branches or pull requests
环境:
运行样例时报错:
AttributeError: '_EllipticCurvePublicKey' object has no attribute 'encrypt'
The text was updated successfully, but these errors were encountered: