private static AesCtrHmacAeadParameters.Variant toVariant(OutputPrefixType outputPrefixType)
      throws GeneralSecurityException {
    switch (outputPrefixType) {
      case TINK:
        return AesCtrHmacAeadParameters.Variant.TINK;
      case CRUNCHY:
      case LEGACY:
        return AesCtrHmacAeadParameters.Variant.CRUNCHY;
      case RAW:
        return AesCtrHmacAeadParameters.Variant.NO_PREFIX;
      default:
        throw new GeneralSecurityException(
            "Unable to parse OutputPrefixType: " + outputPrefixType.getNumber());
    }
  }
Methods to serialize and parse {@link AesCtrHmacAeadKey} objects and {@link
AesCtrHmacAeadParameters} objects.
java_src/src/main/java/com/google/crypto/tink/aead/internal/AesCtrHmacAeadProtoSerialization.java