private static com.google.crypto.tink.proto.AesCtrHmacStreamingParams toProtoParams(
      AesCtrHmacStreamingParameters parameters) throws GeneralSecurityException {
    return com.google.crypto.tink.proto.AesCtrHmacStreamingParams.newBuilder()
        .setCiphertextSegmentSize(parameters.getCiphertextSegmentSizeBytes())
        .setDerivedKeySize(parameters.getDerivedKeySizeBytes())
        .setHkdfHashType(toProtoHashType(parameters.getHkdfHashType()))
        .setHmacParams(
            HmacParams.newBuilder()
                .setHash(toProtoHashType(parameters.getHmacHashType()))
                .setTagSize(parameters.getHmacTagSizeBytes()))
        .build();
  }
Methods to serialize and parse {@link AesCtrHmacStreamingKey} objects and {@link
AesCtrHmacStreamingParameters} objects
java_src/src/main/java/com/google/crypto/tink/streamingaead/internal/AesCtrHmacStreamingProtoSerialization.java