setCxnParams method
设置连接参数
Implementation
Future<bool> setCxnParams({
required String rsaPublicKey,
required String aesKey,
required CxnParams cxnParams,
}) async {
String hiveName = "xxim";
Box box;
if (Hive.isBoxOpen(hiveName)) {
box = Hive.box(hiveName);
} else {
box = await Hive.openBox(hiveName);
}
String packageId = box.get("packageId", defaultValue: "");
if (packageId.isEmpty) {
packageId = SDKTool.getUUId();
box.put("packageId", packageId);
}
bool? status = await _xximCore?.setCxnParams(
reqId: SDKTool.getUUId(),
packageId: packageId,
rsaPublicKey: rsaPublicKey,
aesKey: aesKey,
cxnParams: cxnParams,
);
return status == true;
}