Generally speaking, v2 broke the public API a bit, so most projects using v1 could probably work as-is with v2. However, the private API changed a lot.
Old signatures will fail
Data signed with previous versions fails with
Public API changes¶
Blake2Signer|Blake2TimestampSigner|Blake2SerializerSigner.SEPARATORclass attribute is replaced by the
separatorinstance attribute and is now checked to be ASCII only and not belong to the encoder alphabet.
Blake2SerializerSigner.COMPRESSION_FLAGclass attribute is replaced by the
compression_flaginstance attribute and is now checked to be ASCII only.
Blake2SerializerSigner.COMPRESSION_RATIOclass attribute is replaced by the
compression_ratioinstance attribute and is now checked to be ASCII only.
- The default digest size for all signers is set to 16 bytes. Previously,
Blake2TimestampSignerdefaulted to the maximum allowed size for the hasher.
- The compression parameter used in
use_compressionis renamed to
Private API changes¶
The private API changed a lot, so if you were using some private methods please review them for changes! Unfortunately I can't list them all here but mainly check these commits:
c6acaa0a- 🏗 Split classes into own modules by type
0b1d0a6c- ✨ Allow changing encoder in every signer
c9bcd173- ✨ Make separator an instance attribute
675389de- ✨ Make comp flag and ratio an instance attribute
8618e663- ♻ Refactor serializer signer base methods
40ccbd40- ✨ Add new methods to get data and sig separately
b2d69910- ♻ Rename