Skip to content
pubscout

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.

WASM-ready
$ flutter pub add cryptography_flutter
Source repository

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.4

Alternatives

Packages that do the same job and could replace cryptography_flutter.

  • cryptography_flutter_plus

    Flutter plugin to use platform APIs for package:cryptography_plus

  • webcrypto

    Cross-platform implementation of Web Cryptography APIs for Dart.

  • oqs

    Dart FFI bindings for liboqs enabling post-quantum cryptography primitives like ML-KEM and ML-DSA.

  • quantify

    Type-safe unit conversion and measurement library for Dart and Flutter.

Works with

Packages commonly used together with cryptography_flutter: ones it builds on, ones built on it, and its own family.