flutter_encryption_helper 0.0.1
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).
example/main.dart
// ignore_for_file: avoid_print
import 'dart:convert';
import 'package:flutter_encryption_helper/flutter_encryption_helper.dart';
Future<void> main() async {
final helper = AesGcmHelper();
final key = await helper.generateKey();
const message = 'Hello, encryption!';
final combined = await helper.encrypt(utf8.encode(message), secretKey: key);
final clear = await helper.decrypt(combined, secretKey: key);
print('Decrypted: ${utf8.decode(clear)}');
}