public E toProtoEnum(O objectEnum) throws GeneralSecurityException {
    E protoEnum = toProtoEnumMap.get(objectEnum);
    if (protoEnum == null) {
      throw new GeneralSecurityException("Unable to convert object enum: " + objectEnum);
    }
    return protoEnum;
  }
Converts {@code objectEnum} to the equivalent proto enum.
java_src/src/main/java/com/google/crypto/tink/internal/EnumTypeProtoConverter.java