Create a Digest trait for common methods on digests and convert the SHA-1 implementation to use it.

The DigestUtil trait was created for helper methods since default methods still have issues.
Implement the fixed output size versions of the SHA-2 digest functions.