private static Map<OutputPrefixType, AesSivParameters.Variant> createOutputPrefixToVariantMap() {
    Map<OutputPrefixType, AesSivParameters.Variant> result = new EnumMap<>(OutputPrefixType.class);
    result.put(OutputPrefixType.RAW, AesSivParameters.Variant.NO_PREFIX);
    result.put(OutputPrefixType.TINK, AesSivParameters.Variant.TINK);
    result.put(OutputPrefixType.CRUNCHY, AesSivParameters.Variant.CRUNCHY);
    /** Parse LEGACY prefix to CRUNCHY, since they act the same for this type of key */
    result.put(OutputPrefixType.LEGACY, AesSivParameters.Variant.CRUNCHY);
    return Collections.unmodifiableMap(result);
  }
Methods to serialize and parse {@link AesSivKey} objects and {@link AesSivParameters} objects
java_src/src/main/java/com/google/crypto/tink/daead/internal/AesSivProtoSerialization.java