Create a Digest trait for common methods on digests and convert the Sha1 implementation to use it.
Implement the fixed output size versions of the SHA-2 digest functions.