public static String toHmacAlgo(HashType hash) throws NoSuchAlgorithmException {
    switch (hash) {
      case SHA1:
        return "HmacSha1";
      case SHA224:
        return "HmacSha224";
      case SHA256:
        return "HmacSha256";
      case SHA384:
        return "HmacSha384";
      case SHA512:
        return "HmacSha512";
      default:
        throw new NoSuchAlgorithmException("hash unsupported for HMAC: " + hash);
    }
  }
Returns the HMAC algorithm name corresponding to a hash type.

@param hash the hash type
@return the JCE's HMAC algorithm name for the hash.
java_src/src/main/java/com/google/crypto/tink/hybrid/HybridUtil.java