![]() Pub_key – the rsa.PublicKey of the person signing the message. Signature – the signature block, as created with rsa.sign(). The hash method is detected automatically from the signature. Verifies that the signature matches the message. verify ( message : bytes, signature : bytes, pub_key : ) → str ¶ OverflowError – if the private key is too small to contain the Hash_method – the hash method used on the message. Priv_key – the rsa.PrivateKey to sign with If message has a read() method, it is assumed to be a This is knownĪs a “detached signature”, because the message itself isn’t altered. Hashes the message, then signs the hash with the given key. ![]() sign ( message : bytes, priv_key :, hash_method : str ) → bytes ¶ crypto = encrypt ( b 'hello', pub_key ) > crypto = crypto + b 'X' + crypto # change a byte > decrypt ( crypto, priv_key ) Traceback (most recent call last).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |