Skip to content

pyHanko 0.3.0 alpha

Pre-release
Pre-release

Choose a tag to compare

@MatthiasValvekens MatthiasValvekens released this 26 Jan 22:09
· 2395 commits to master since this release
0.3.0

The release has been uploaded to PyPI. Documentation is available on ReadTheDocs.

Note: The public API is not completely stable yet, so future releases may still include API changes. This is particularly likely for the validation code and the pdf_utils package; please refer to the documentation for further details.

Change log

New features and enhancements

Encryption

  • Reworked internal crypto API.
  • Added support for PDF 2.0 encryption.
  • Added support for public key encryption.
  • Got rid of the homegrown RC4 class (not that it matters all to much, RC4 isn't secure anyhow); all cryptographic operations in crypt.py are now delegated to oscrypto.

Signing

  • Encrypted files can now be signed from the CLI.
  • With the optional cryptography dependency, pyHanko can now create RSASSA-PSS signatures.
  • Factored out a low-level PdfCMSEmbedder API to cater to remote signing needs.

Miscellaneous

  • The document ID can now be accessed more conveniently.
  • The version number is now single-sourced in version.py.
  • Initialising the page tree in a PdfFileWriter is now optional.
  • Added a convenience function for copying files.

Validation

  • With the optional cryptography dependency, pyHanko can now validate RSASSA-PSS signatures.
  • Difference analysis checker was upgraded with capabilities to handle multiply referenced objects in a more straightforward way. This required API changes, and it comes at a significant performance cost, but the added cost is probably justified. The changes to the API are limited to the diff_analysis module itself, and do not impact the general validation API whatsoever.

Bugs fixed

  • Allow /DR and /Version updates in diff analysis
  • Fix revision handling in trailer.flatten()