Feature/master/pup 1840 tunable digest algorithm

This refactors GH-2452 into smaller commits and simplifies how tests are run with all digest algorithms.

This supersedes GH-2452.