private static com.google.crypto.tink.proto.AesGcmHkdfStreamingParams toProtoParams(
      AesGcmHkdfStreamingParameters parameters) throws GeneralSecurityException {
    return com.google.crypto.tink.proto.AesGcmHkdfStreamingParams.newBuilder()
        .setCiphertextSegmentSize(parameters.getCiphertextSegmentSizeBytes())
        .setDerivedKeySize(parameters.getDerivedAesGcmKeySizeBytes())
        .setHkdfHashType(toProtoHashType(parameters.getHkdfHashType()))
        .build();
  }
Methods to serialize and parse {@link AesGcmHkdfStreamingKey} objects and {@link
AesGcmHkdfStreamingParameters} objects
java_src/src/main/java/com/google/crypto/tink/streamingaead/internal/AesGcmHkdfStreamingProtoSerialization.java