public static void register(boolean newKeyAllowed) throws GeneralSecurityException {
    if (!TinkFipsUtil.AlgorithmFipsCompatibility.ALGORITHM_NOT_FIPS.isCompatible()) {
      throw new GeneralSecurityException(
          "Registering AES-GCM HKDF Streaming AEAD is not supported in FIPS mode");
    }
    AesGcmHkdfStreamingProtoSerialization.register();
    MutableParametersRegistry.globalInstance().putAll(namedParameters());
    MutableKeyDerivationRegistry.globalInstance()
        .add(KEY_DERIVER, AesGcmHkdfStreamingParameters.class);
    MutableKeyCreationRegistry.globalInstance()
        .add(KEY_CREATOR, AesGcmHkdfStreamingParameters.class);
    MutablePrimitiveRegistry.globalInstance()
        .registerPrimitiveConstructor(AES_GCM_HKDF_STREAMING_AEAD_PRIMITIVE_CONSTRUCTOR);
    KeyManagerRegistry.globalInstance().registerKeyManager(legacyKeyManager, newKeyAllowed);
  }
This key manager generates new {@code AesGcmHkdfStreamingKey} keys and produces new instances of
{@code AesGcmHkdfStreaming}.
java_src/src/main/java/com/google/crypto/tink/streamingaead/AesGcmHkdfStreamingKeyManager.java