fred
fred copied to clipboard
Remove pooling and other special cases for SHA-256 digests
During review of #831 it was observed that the overhead of pooling outweights that of constructing new digest instances. This PR removes the pooling mechanism from the SHA256 helper class. Because the return-to-pool method is now a no-op, its usages are removed. The method is now deprecated, but remains for backwards compatibility.
While cleaning up I encountered the HashType enum, which had a special case for pooling of SHA-256 too. This deprecates the related return-to-pool method, and removes the special handling of SHA-256 message digest creation in this class.