encrypt method
Encrypts text and embeds it into imageBytes.
Returns stego image bytes (PNG or JPEG, matching the carrier format).
Implementation
Future<Uint8List> encrypt({
required Uint8List imageBytes,
required String text,
}) {
_ensureActive();
return _engine.embed(
imageBytes: imageBytes,
data: Uint8List.fromList(utf8.encode(text)),
key: _key,
method: method,
cipher: cipher,
);
}