> I have replaced verify() with compare_digest().
+ >>> compare_digesty(cookie, '0102030405060708090a0b0c0d0e0f00')
Typo here. Also, this doesn't look like it compares the digest. Maybe you can keep the verify() function, but make it use compare_digest() -- this looks more clear to me:
>>> def verify(cookie, sig):
... good_sig = sign(cookie)
... return compare_digest(goodsig, sig)
> Python requires a C89 compatible compiler and 32bit architecture. C89 doesn't mandate 64bit integers. As far as I remember there is (or was) one buildbot with a compiler, that doesn't have 64 ints on an old SPARC system. All major platforms have 64bit ints. I might modify the implementation when the patch has landed.
Oh, I see. Thanks! |