encrypt method

  1. @override
Future<Map?> encrypt(
  1. List<int> data,
  2. List<int> key
)
override

Implementation

@override
Future<Map?> encrypt(List<int> data, List<int> key) async {
  final plainData = asUint8List(data);
  final keyData = asUint8List(key);
  final encryptedObj = await methodChannel
      .invokeMethod<Map>('encrypt', {'data': plainData, 'key': keyData});
  return encryptedObj;
}