Pull requests

#191 Merged
lvh lvh
pypy pypy

Pure-Python SHA implementation is confused

  1. Laurens Van Houtven
  1. A docstring claims to be MD5.
  2. The block_size constant is wrong.

This is being sent to "default". Is that okay? I don't know how to bitbucket.

There's an API bug as well. You're supposed to be able to call it as sha(some_message).digest(), but this implementation doesn't support that, so you have to do h = sha(); h.update(some_message); h.digest(). I guess that should be another pull request.

There should be tests for this, but I can't figure out where to put them. It seems few people care about this because they usually get the OpenSSL backed implementation.

Comments (2)

  1. Rami Chowdhury

    This looks fine to me -- perhaps create another branch for the fixes to this (including the API changes and tests)? I think you can ask BitBucket to do a new branch in the destination side of the pull request form.

    As I'm sure you've noticed, the pull requests on BitBucket don't get checked very often, it's useful to ping the pypy-dev list about it :-)