private static AesGcmHkdfStreamingParameters toParametersObject(
      com.google.crypto.tink.proto.AesGcmHkdfStreamingParams params, int keySize)
      throws GeneralSecurityException {
    return AesGcmHkdfStreamingParameters.builder()
        .setKeySizeBytes(keySize)
        .setDerivedAesGcmKeySizeBytes(params.getDerivedKeySize())
        .setCiphertextSegmentSizeBytes(params.getCiphertextSegmentSize())
        .setHkdfHashType(toHashType(params.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