private static HmacParameters.HashType getHmacHashType(JwtHmacParameters.Algorithm algorithm)
      throws GeneralSecurityException {
    if (algorithm.equals(JwtHmacParameters.Algorithm.HS256)) {
      return HmacParameters.HashType.SHA256;
    }
    if (algorithm.equals(JwtHmacParameters.Algorithm.HS384)) {
      return HmacParameters.HashType.SHA384;
    }
    if (algorithm.equals(JwtHmacParameters.Algorithm.HS512)) {
      return HmacParameters.HashType.SHA512;
    }
    throw new GeneralSecurityException("Unsupported algorithm: " + algorithm);
  }
This key manager generates new {@code JwtHmacKey} keys and produces new instances of {@link
JwtHmac}.
java_src/src/main/java/com/google/crypto/tink/jwt/JwtHmacKeyManager.java