private static AesCtrHmacStreamingParameters.HashType toHashType(HashType hashType)
      throws GeneralSecurityException {
    switch (hashType) {
      case SHA1:
        return AesCtrHmacStreamingParameters.HashType.SHA1;
      case SHA256:
        return AesCtrHmacStreamingParameters.HashType.SHA256;
      case SHA512:
        return AesCtrHmacStreamingParameters.HashType.SHA512;
      default:
        throw new GeneralSecurityException(
            "Unable to parse HashType: " + hashType.getNumber());
    }
  }
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