Merge branch 'master' of https://github.com/mitsuhiko/itsdangerous into debian/unstable
Simon Fondrie-Teitler
9 years ago
5 | 5 | A module that implements various functions to deal with untrusted |
6 | 6 | sources. Mainly useful for web applications. |
7 | 7 | |
8 | :copyright: (c) 2011 by Armin Ronacher and the Django Software Foundation. | |
8 | :copyright: (c) 2014 by Armin Ronacher and the Django Software Foundation. | |
9 | 9 | :license: BSD, see LICENSE for more details. |
10 | 10 | """ |
11 | 11 | |
354 | 354 | def verify_signature(self, value, sig): |
355 | 355 | """Verifies the signature for the given value.""" |
356 | 356 | key = self.derive_key() |
357 | sig = base64_decode(sig) | |
357 | try: | |
358 | sig = base64_decode(sig) | |
359 | except Exception: | |
360 | return False | |
358 | 361 | return self.algorithm.verify_signature(key, value, sig) |
359 | 362 | |
360 | 363 | def unsign(self, signed_value): |