encrypt method

Future<String> encrypt({
  1. required String data,
  2. required String password,
})

Encrypts the provided data using AES encryption.

  • data: The plaintext data to be encrypted.
  • password: The password or key used for encryption.

Returns a Future containing the encrypted data as a String.

Implementation

Future<String> encrypt({required String data, required String password}) {
  return BouncyCastleSecurityPlatform.instance.encrypt(data, password);
}