encryptWithKey function Null safety

Future<EncryptionResult> encryptWithKey(
  1. {required EncryptionStrategy encryptionStrategy,
  2. required EncryptionKey key,
  3. required List<int> data}

Encrypts data with EncryptionKey, data must be provided in bytes A EncryptionKey can be a symmetrical key or a key pair, which corresponds to AES or RSA EncryptionStrategy


Future<EncryptionResult> encryptWithKey({
  required EncryptionStrategy encryptionStrategy,
  required EncryptionKey key,
  required List<int> data,
}) {
  return _encrypt(data: data as Uint8List, encryptionStrategy: encryptionStrategy, key: key);