b4lr's request to support sha1, but with tests and a little more consistency in the property names