cryptography_flutter
2.3.4, released 12 months ago by dint.dev
Flutter plugin that lets the cryptography package use native OS crypto APIs for faster, compliant operations.
What it does
It provides platform‑specific implementations of cryptographic algorithms (AES‑GCM, ChaCha20‑Poly1305, ECDH/ECDSA, etc.) that fall back to Dart or background isolates when needed. The plugin speeds up encryption, decryption, and key operations by calling Android, iOS, and macOS native crypto libraries.
AI-written summary of version 2.3.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need high‑performance or FIPS‑compliant cryptography on Android, iOS, or macOS
- You want to off‑load heavy crypto work to native code or background isolates
Skip it when
- Your app runs on platforms without native support (e.g., web, Linux, Windows)
- You require deterministic pure‑Dart behavior for testing or reproducibility
Strengths
- Up to 100× speed boost on supported platforms
- Uses OS‑provided, standards‑compliant implementations
- Automatic fallback to Dart or background isolates
Weaknesses
- Adds native code and plugin setup
- Only works on Android, iOS, macOS; no web support
- Potentially easier reverse‑engineering of native calls
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
dependencies:
cryptography: ^2.8.1g
cryptography_flutter: ^2.3.4Alternatives
Packages that do the same job and could replace cryptography_flutter.
- cryptography_flutter_plus
Flutter plugin to use platform APIs for package:cryptography_plus
73Compare - webcrypto
Cross-platform implementation of Web Cryptography APIs for Dart.
89Compare - oqs
Dart FFI bindings for liboqs enabling post-quantum cryptography primitives like ML-KEM and ML-DSA.
61Compare - quantify
Type-safe unit conversion and measurement library for Dart and Flutter.
61Compare
Works with
Packages commonly used together with cryptography_flutter: ones it builds on, ones built on it, and its own family.
- cryptographycryptography_flutter depends on itCross‑platform cryptographic algorithms for Dart and Flutter.
- jwkSame familyEncode and decode JSON Web Keys for use with the cryptography package
- aes256Built on cryptography_flutterAES‑256‑GCM encryption/decryption with PBKDF2‑SHA256 key derivation.
- secure_shared_preferencesBuilt on cryptography_flutterEncrypt shared preferences on Android and UserDefaults on iOS using AES-CBC-128.