code: public static String dgstHex(byte[] input, Digest digest) {
          checkNotNull(input);
          byte[] dgstBytes = dgst(input, digest);
          return BaseEncoding.base16().encode(dgstBytes);
      }
docs: Calculates digest and returns the value as a hex string.
  
  @param input  input bytes
  @param digest digest algorithm
  @return digest as a hex string