fernet 0.0.2 copy "fernet: ^0.0.2" to clipboard
fernet: ^0.0.2 copied to clipboard

A Dart library for encrypting and decrypting messages using the Fernet scheme.

example/fernet.dart

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.'
}
1
likes
160
pub points
59%
popularity

Publisher

verified publisherpanda.observer

A Dart library for encrypting and decrypting messages using the Fernet scheme.

Repository (GitHub)
View/report issues

Topics

#crypto #cryptography #encryption #security

Documentation

API reference

Funding

Consider supporting this project:

www.buymeacoffee.com

License

BSD-3-Clause (license)

Dependencies

pointycastle

More

Packages that depend on fernet