encryptString method
Implementation
Future<SecretBox> encryptString(
String clearText, {
required SecretKey secretKey,
}) async {
final bytes = utf8.encode(clearText);
final secretBox = await encrypt(
bytes,
secretKey: secretKey,
possibleBuffer: bytes,
);
// Overwrite `bytes` if it was not overwritten by the cipher.
tryEraseBytes(bytes, unlessUsedIn: secretBox.cipherText);
return secretBox;
}