Skip to content
pubscout

cryptography_plus

3.0.0, released 9 months ago by emz-hanauer.com

Cryptographic algorithms for encryption, signatures, key agreement, and hashing across platforms.

WASM-ready
$ flutter pub add cryptography_plus
Source repository

What it does

Provides popular cryptographic algorithms including AES, ChaCha20, ED25519, X25519, Argon2, and various hashing and MAC functions. It supports multi-platform usage with optimized browser Web Crypto and operating system APIs.

AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need secure encryption, decryption, or password hashing in your Dart or Flutter application.
  • You require cross-platform cryptographic operations with browser performance optimization.

Skip it when

  • You only need simple built-in Dart operations without advanced ciphers or key exchange protocols.

Strengths

  • Good cross-platform support including web, mobile, and desktop.
  • Utilizes platform APIs and Web Cryptography for improved performance.
  • Comprehensive algorithm support (AES, ChaCha20, Ed25519, Argon2id, etc.).

Weaknesses

  • Some non-Dart algorithms (like NIST elliptic curves and RSA) lack pure-Dart implementations.
  • Complex API surface with ongoing transitions to wands and new major versions.

Setup

Kind
FFI (native library)
Effort
Low
Code generation
No
Direct dependencies
6

Optionally import cryptography_flutter_plus when using Flutter to delegate calls to Android/iOS/macOS OS APIs.

final algorithm = AesGcm.with256bits();
final secretKey = await algorithm.newSecretKey();
final nonce = algorithm.newNonce();

final encrypted = await algorithm.encrypt(
  utf8.encode('Hello world!'),
  secretKey: secretKey,
  nonce: nonce,
);

Alternatives

Packages that do the same job and could replace cryptography_plus.

  • cryptography

    The original package maintained by gohilla before repository movement and community updates in cryptography_plus.

Works with

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