Skip to content
pubscout

aes256

2.2.4, released 5 days ago by knottx.dev

AES‑256‑GCM encryption/decryption with PBKDF2‑SHA256 key derivation.

WASM-ready
$ flutter pub add aes256
Source repository

What it does

Provides simple async methods to encrypt and decrypt text using a passphrase. The library builds a binary payload of salt, nonce, ciphertext and tag and works on all Flutter platforms.

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

Use it when

  • You need client‑side symmetric encryption with a passphrase
  • Cross‑platform support including web, mobile and desktop
  • You want a lightweight pure‑Dart solution with strong defaults

Skip it when

  • You require hardware‑accelerated crypto or custom algorithms
  • Key management must be done with secure hardware or external KMS
  • Performance is critical for large data streams

Strengths

  • Strong defaults (100k PBKDF2 iterations, random salt/nonce)
  • Works everywhere (Flutter, Dart VM, Web) without native code
  • Simple, stateless API

Weaknesses

  • Relies on a user‑provided passphrase for key material
  • No support for other ciphers or modes
  • Web version lacks native acceleration

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
import 'package:aes256/aes256.dart';

void main() async {
  final encrypted = await Aes256.encrypt(text: 'Hello world', passphrase: 'my-passphrase');
  final decrypted = await Aes256.decrypt(encrypted: encrypted, passphrase: 'my-passphrase');
  print(decrypted); // Hello world
}

Alternatives

Packages that do the same job and could replace aes256.

  • crypto

    Provides low‑level cryptographic primitives including AES and PBKDF2 without the higher‑level payload handling.

Works with

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