Skip to content

Inspirations

This library was born as the need to simply sign some data structure to store it in a cookie securely. I had been using itsdangerous for that but this time I wanted something simpler and uncomplicated, so I wrote a couple of lines and got it working using native BLAKE2 in keyed hashing mode; of course that to achieve it I read Django's signer and itsdangerous source code a lot.

I then published that as a Gist for others (and me) to use in a copy-and-paste fashion. I proceeded to add a few features, tests, and the like and eventually asked myself: why not create an actual package?. The more I edited the Gist, the more I believed it could actually be more useful as a package, and to be actually installed in projects, just like other excellent libs such as itsdangerous, Django's signer, pypaseto, pyjwt, etc.

Again, if itsdangerous exists and can use BLAKE2 as hashing algorithm, why write something from scratch? I think that the main reasons for me were simplicity, better defaults, and an easier to use API. I wanted something that one would import and use pretty much as-is, and of course I expected that to be secure and performant.

Therefore, blake2signer as a package was born. Check out the comparison with other libs section if you are currently using one of the aforementioned ones and want to give this lib a try, or move on to the examples or details section to get yourself quickly started.

Back to top