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
At https://stuvel.eu/python-rsa-doc/usage.html#signing-and-verification, the first example in this section states the following.
(pubkey, privkey) = rsa.newkeys(512) message = 'Go left at the blue tree' signature = rsa.sign(message, privkey, 'SHA-1')
and the second example states the following.
message = 'Go left at the blue tree' hash = rsa.compute_hash(message, 'SHA-1') signature = rsa.sign_hash(hash, privkey, 'SHA-1')
If these two are followed as-is, it would result as an AssertionError.
AssertionError
To solve this, we would need to add encoding
at L#2 of the first example,
(pubkey, privkey) = rsa.newkeys(512) message = 'Go left at the blue tree'.encode('utf-8') signature = rsa.sign(message, privkey, 'SHA-1')
and
at L#1 of the second example.
message = 'Go left at the blue tree'.encode('utf-8') hash = rsa.compute_hash(message, 'SHA-1') signature = rsa.sign_hash(hash, privkey, 'SHA-1')
Such kind of corrections is also needed in other examples of the same section.
The text was updated successfully, but these errors were encountered:
539c54a
Thanks for the report!
Sorry, something went wrong.
No branches or pull requests
At https://stuvel.eu/python-rsa-doc/usage.html#signing-and-verification, the first example in this section states the following.
and the second example states the following.
If these two are followed as-is, it would result as an
AssertionError
.To solve this, we would need to add encoding
at L#2 of the first example,
and
at L#1 of the second example.
Such kind of corrections is also needed in other examples of the same section.
The text was updated successfully, but these errors were encountered: