Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.1.0

* Convert from a Flutter plugin to a pure Dart package; platform-specific code was never used.
* BREAKING: remove the `StackWalletBackup` class and the method channel / platform interface scaffolding, which only exposed `getPlatformVersion`.
* Migrate tests from `flutter_test` to `package:test`.

## 0.0.1

* TODO: Describe initial release.
18 changes: 18 additions & 0 deletions example/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import 'dart:convert';
import 'dart:typed_data';

import 'package:stack_wallet_backup/stack_wallet_backup.dart';

Future<void> main() async {
const String passphrase = 'correct horse battery staple';
final Uint8List plaintext =
Uint8List.fromList(utf8.encode('A secret message to be backed up'));

// Encrypt with a passphrase
final Uint8List blob = await encryptWithPassphrase(passphrase, plaintext);
print('Encrypted ${plaintext.length} bytes to a ${blob.length} byte blob');

// Decrypt with the same passphrase
final Uint8List decrypted = await decryptWithPassphrase(passphrase, blob);
print('Decrypted: ${utf8.decode(decrypted)}');
}
7 changes: 3 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name: stack_wallet_backup
description: A new Flutter plugin project.
version: 0.0.1
description: Create and restore secure encrypted backups using a passphrase.
version: 0.1.0
homepage:

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.10.2"

dependencies:
collection: ^1.16.0
cryptography: ^2.0.5
tuple: ^2.0.0

dev_dependencies:
test: ^1.0.0
test: ^1.24.0
lints: ^6.0.0
Loading