homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author scott.dial
Recipients gregory.p.smith, kristjan.jonsson, scott.dial
Date 2010年11月19日.10:07:38
SpamBayes Score 1.9187244e-06
Marked as misclassified No
Message-id <1290161260.55.0.497778861662.issue10430@psf.upfronthosting.co.za>
In-reply-to
Content
Got a test case that demonstrates a failure? Looks like it works to me...
$ uname -ip
sparc SUNW,Sun-Fire-280R
$ python -c 'import sys; print sys.byteorder'
big
$ python -c 'import sha; print sha.new(open("test", "rb").read()).hexdigest()'
851faf3199d27200abf2750c14ae6451696216a9
$ sha1sum -b test
851faf3199d27200abf2750c14ae6451696216a9 *test
# uname -ip
AMD Sempron(tm) Processor 2800+ AuthenticAMD
# python -c 'import sys; print sys.byteorder'
little
# python -c 'import sha; print sha.new(open("test", "rb").read()).hexdigest()'
851faf3199d27200abf2750c14ae6451696216a9
# sha1sum -b /tmp/test
851faf3199d27200abf2750c14ae6451696216a9 *test
I think your code analysis is wrong. Perhaps you missed the call to longReverse(), which does endianness byte-swapping, at the beginning of the sha_transform() that specifically is commented: "When run on a little-endian CPU we need to perform byte reversal on an array of longwords."
History
Date User Action Args
2010年11月19日 10:07:40scott.dialsetrecipients: + scott.dial, gregory.p.smith, kristjan.jonsson
2010年11月19日 10:07:40scott.dialsetmessageid: <1290161260.55.0.497778861662.issue10430@psf.upfronthosting.co.za>
2010年11月19日 10:07:38scott.diallinkissue10430 messages
2010年11月19日 10:07:38scott.dialcreate

AltStyle によって変換されたページ (->オリジナル) /