encrypt_secure
Secure XChaCha20-Poly1305 encryption for Flutter using sodium_libs.
Features
- XChaCha20-Poly1305 encryption
- Custom Base64 key support
- Additional Authenticated Data (AAD)
- Singleton service
Installation
dependencies:
encrypt_secure: ^1.0.0
await EncryptionService.instance.init(
base64Key: "YOUR_BASE64_KEY",
);
final encrypted = await EncryptionService.instance.encryptString(
plainText: "Hello",
);
final decrypted = await EncryptionService.instance.decryptString(
message: encrypted,
);