encrypt abstract method

Future<String?> encrypt(
  1. String string,
  2. String key
)

Encrypts string using a key generated from generateRandomKey or generateKeyFromPassword. The returned string is a sequence of 3 base64-encoded strings (iv, mac and cipherText) and can be transferred and stored almost anywhere.

Implementation

Future<String?> encrypt(String string, String key);