encryptWithKeyRef method

  1. @override
Future<List<int>> encryptWithKeyRef(
  1. KeyRef keyRef,
  2. List<int> plain,
  3. EncryptionAlgorithm algorithm
)

Implementation

@override
Future<List<int>> encryptWithKeyRef(
  KeyRef keyRef,
  List<int> plain,
  EncryptionAlgorithm algorithm,
) async {
  final result = await _channel.invokeMethod<Uint8List>('encryptWithKeyRef', {
    'keyId': keyRef.keyId,
    'plain': Uint8List.fromList(plain),
    'algorithm': encryptionAlgorithmName(algorithm),
  });
  return result ?? const [];
}