Fix logic for adding digestAlgorithm, original patch from Douglas E Engert.
Fix logic for adding digestAlgorithm, original patch from Douglas E Engert.

madscientist159/heimdal,madscientist159/heimdal,madscientist159/heimdal,madscientist159/heimdal,madscientist159/heimdal,madscientist159/heimdal,madscientist159/heimdal