Create a digest function with the specified algorithm and salt provider.
digest algorithm name
a function computing a salt for a particular hash input value