Message126696
Given a string, encoding it with .encode('base64') is not the same as using base64's b64encode function. I think this is very unclear and unintuitive.
Here's some example code to demonstrate the problem. Before I attempt to submit a patch, is this done for legacy reasons? Are there any reasons to use one over the other?
import hmac
import hashlib
import base64
signature = hmac.new('secret', 'url', hashlib.sha512).digest()
assert signature.encode('base64') == base64.b64encode(signature) |
|
Date |
User |
Action |
Args |
2011-01-21 06:25:16 | mahmoudimus | set | recipients:
+ mahmoudimus |
2011-01-21 06:25:16 | mahmoudimus | set | messageid: <1295591116.22.0.262504941667.issue10970@psf.upfronthosting.co.za> |
2011-01-21 06:25:11 | mahmoudimus | link | issue10970 messages |
2011-01-21 06:25:11 | mahmoudimus | create | |
|