Encrypt the data with the pair.
data
pair
static Future<String?> encrypt(Object data, KeyPair pair) => toFuture(SeaJsImpl.encrypt(dartToJs(data)!, pair));