fernet 0.0.3 fernet: ^0.0.3 copied to clipboard
A Dart library for encrypting and decrypting messages using the Fernet scheme.
import 'dart:convert';
import 'dart:typed_data';
import 'package:fernet/fernet.dart';
void main() {
final Fernet f = Fernet(Fernet.generateKey());
final Uint8List token = f.encrypt(Uint8List.fromList(
utf8.encode('A really secret message. Not for prying eyes.')));
print(utf8.decode(f.decrypt(token)));
// OUTPUT: 'A really secret message. Not for prying eyes.'
}