Skip to content
New issue

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

Update PSS docs for Python 3. #783

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Conversation

jelaiw
Copy link
Contributor

@jelaiw jelaiw commented Nov 30, 2023

While trying the code example (for signing) at https://www.pycryptodome.org/src/signature/pkcs1_pss, I ran into a few exceptions (in Python 3.10). Figured this may be a good time to update this example.

Patch does the following:

  • Update message to byte string (otherwise SHA256.new() throws an exception).
  • Update RSA.import_key() to read DER file in binary (otherwise this call throws an exception too; plus, pss.new() expects a byte string now).
  • Removed an unused import statement for Crypto.Random.

make html appears to build the docs as expected.

Hope this helps!

Update message to byte string.

Update RSA.import_key() to read DER file in binary.
@Legrandin Legrandin merged commit c9f1288 into Legrandin:master Dec 12, 2023
37 checks passed
@Legrandin
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants