mitsuhiko/itsdangerous — pull request #12 by rhyselsmore (2012-06-22 13:00:55+00:00)
Title: Custom Hashlib for Serialized Objects

Not sure if this was already in place.

Unless I am missing something (which could be the case), it isn't possible through any easy means to set a custom hashlib on these objects.

This works with no deviation to the usual way of setting a hasblib in the Signer classes.

s = URLSafeSerializer('secret-key')
s.digest_method = hashlib.sha512
s.dumps([1, 2, 3, 4])

Haven't completed tests or documentation for this yet, it more was getting the feelers out there to see if it is the right way of going about things.