public static void register(boolean newKeyAllowed) throws GeneralSecurityException {
    if (!TinkFipsUtil.AlgorithmFipsCompatibility.ALGORITHM_NOT_FIPS.isCompatible()) {
      throw new GeneralSecurityException("Registering HKDF PRF is not supported in FIPS mode");
    }
    HkdfPrfProtoSerialization.register();
    MutablePrimitiveRegistry.globalInstance().registerPrimitiveConstructor(HKDF_PRF_CONSTRUCTOR);
    MutablePrimitiveRegistry.globalInstance()
        .registerPrimitiveConstructor(STREAMING_HKDF_PRF_CONSTRUCTOR);
    MutableKeyCreationRegistry.globalInstance().add(KEY_CREATOR, HkdfPrfParameters.class);
    MutableParametersRegistry.globalInstance().putAll(namedParameters());
    KeyManagerRegistry.globalInstance().registerKeyManager(legacyKeyManager, newKeyAllowed);
  }
This key manager generates new {@code HkdfPrfKey} keys and produces new instances of {@code
HkdfStreamingPrf} and {@code HkdfPrf}.
java_src/src/main/java/com/google/crypto/tink/prf/HkdfPrfKeyManager.java