added hash alg helper functions