Pull requests

#191 Merged
Repository
lvh lvh
Branch
default
Repository
pypy pypy
Branch
default

Pure-Python SHA implementation is confused

Author
  1. Laurens Van Houtven avatarLaurens Van Houtven
Reviewers
Description
  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 :-)

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.