createKey function
根据max数组,生成加密key
Implementation
Future<List<int>> createKey(List<int> macAddressList) async {
if (macAddressList.length != 6) {
print('mac地址的数组长度不对');
return [];
}
List<int> keyList = [];
List? keyList_temp = await ZygFlutterPlugin().getKeyWithArr(macAddressList);
if (keyList_temp == null || keyList_temp.length != 16) {
return [];
}
keyList = keyList_temp.map((toElement) {
return int.parse(toElement.toString());
}).toList();
return keyList;
}