flutter_encryption_helper 0.0.1 copy "flutter_encryption_helper: ^0.0.1" to clipboard
flutter_encryption_helper: ^0.0.1 copied to clipboard

Easy-to-use, cross-platform AES-GCM encryption/decryption utilities for Dart and Flutter (Web/WASM, iOS, Android, Windows, macOS, Linux).

flutter_encryption_helper #

Easy-to-use, cross-platform AES-GCM encryption/decryption utilities for Dart and Flutter.

pub package License: MIT GitHub stars

  • Platforms: iOS, Android, Web, Windows, macOS, Linux
  • WASM compatible: Yes (via package:cryptography)

Install #

dart pub add flutter_encryption_helper

Quick start #

import 'dart:convert';
import 'package:cryptography/cryptography.dart';
import 'package:flutter_encryption_helper/flutter_encryption_helper.dart';

Future<void> main() async {
  final helper = AesGcmHelper();
  final key = await helper.generateKey();

  final data = utf8.encode('secret');
  final combined = await helper.encrypt(data, secretKey: key);
  final clear = await helper.decrypt(combined, secretKey: key);
  print(utf8.decode(clear));
}

API Highlights #

  • AesGcmHelper.generateKey() – create a secure 256-bit key
  • AesGcmHelper.encrypt() – returns nonce + ciphertext + mac combined
  • AesGcmHelper.decrypt() – accepts the combined format from encrypt()
  • AesGcmHelper.encryptDetached() – returns SecretBox for custom handling

Platforms & WASM #

This package uses package:cryptography, which provides implementations compatible with Flutter and Web/WASM environments. No native setup required.

License #

MIT © Dhia Bechattaoui

1
likes
160
points
32
downloads

Publisher

verified publisherbechattaoui.dev

Weekly Downloads

Easy-to-use, cross-platform AES-GCM encryption/decryption utilities for Dart and Flutter (Web/WASM, iOS, Android, Windows, macOS, Linux).

Repository
View/report issues

Topics

#encryption #cryptography #security #flutter #wasm

Documentation

API reference

License

MIT (license)

Dependencies

cryptography

More

Packages that depend on flutter_encryption_helper