private static AesCtrHmacStreamingParameters toParametersObject(
      com.google.crypto.tink.proto.AesCtrHmacStreamingParams params, int keySize)
      throws GeneralSecurityException {
    return AesCtrHmacStreamingParameters.builder()
        .setKeySizeBytes(keySize)
        .setDerivedKeySizeBytes(params.getDerivedKeySize())
        .setCiphertextSegmentSizeBytes(params.getCiphertextSegmentSize())
        .setHkdfHashType(toHashType(params.getHkdfHashType()))
        .setHmacHashType(toHashType(params.getHmacParams().getHash()))
        .setHmacTagSizeBytes(params.getHmacParams().getTagSize())
        .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