encrypt<Text, Key> abstract method

CipherParams encrypt<Text, Key>(
  1. Text? plainText,
  2. Key? key,
  3. {CipherOptions? options}
)

The encrypt method takes in plain text, a key, and optionally an initialization vector (iv) and cipher options. It returns a CipherParams object which contains the encrypted data. The method is generic and can work with any type of data for the plain text, key, and iv.

Implementation

CipherParams encrypt<Text, Key>(Text? plainText, Key? key,
    {CipherOptions? options});