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

age encryption implementation using Dart. age is a modern file encryption format with multiple pluggable recipients, and seekable streaming encryption.

example/dage.dart

import 'dart:typed_data';

import 'package:dage/src/file.dart';
import 'package:dage/src/x25519.dart';

void main() async {
  // Generate keypair
  final keyPair = await X25519AgePlugin.generateKeyPair();
  // Encryption
  final content = Uint8List.fromList('Hello World'.codeUnits);
  final encryptedFile = await AgeFile.encrypt(content, [keyPair.recipient]);
  //Decryption
  final decrypted = await encryptedFile.decrypt([keyPair]);

  assert(String.fromCharCodes(decrypted) == 'Hello World');
}
1
likes
130
pub points
32%
popularity

Publisher

verified publisherproducement.com

age encryption implementation using Dart. age is a modern file encryption format with multiple pluggable recipients, and seekable streaming encryption.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

args, bech32, collection, convert, cryptography, logging

More

Packages that depend on dage