fernet 0.0.3 copy "fernet: ^0.0.3" to clipboard
fernet: ^0.0.3 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
points
73
downloads

Publisher

verified publisherpanda.observer

Weekly Downloads

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