File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 0.1.0
2+
3+ * Convert from a Flutter plugin to a pure Dart package; platform-specific code was never used.
4+ * BREAKING: remove the ` StackWalletBackup ` class and the method channel / platform interface scaffolding, which only exposed ` getPlatformVersion ` .
5+ * Migrate tests from ` flutter_test ` to ` package:test ` .
6+
17## 0.0.1
28
39* TODO: Describe initial release.
Original file line number Diff line number Diff line change 1+ import 'dart:convert' ;
2+ import 'dart:typed_data' ;
3+
4+ import 'package:stack_wallet_backup/stack_wallet_backup.dart' ;
5+
6+ Future <void > main () async {
7+ const String passphrase = 'correct horse battery staple' ;
8+ final Uint8List plaintext =
9+ Uint8List .fromList (utf8.encode ('A secret message to be backed up' ));
10+
11+ // Encrypt with a passphrase
12+ final Uint8List blob = await encryptWithPassphrase (passphrase, plaintext);
13+ print ('Encrypted ${plaintext .length } bytes to a ${blob .length } byte blob' );
14+
15+ // Decrypt with the same passphrase
16+ final Uint8List decrypted = await decryptWithPassphrase (passphrase, blob);
17+ print ('Decrypted: ${utf8 .decode (decrypted )}' );
18+ }
Original file line number Diff line number Diff line change 11name : stack_wallet_backup
2- description : A new Flutter plugin project .
3- version : 0.0.1
2+ description : Create and restore secure encrypted backups using a passphrase .
3+ version : 0.1.0
44homepage :
55
66environment :
77 sdk : " >=3.0.0 <4.0.0"
8- flutter : " >=3.10.2"
98
109dependencies :
1110 collection : ^1.16.0
1211 cryptography : ^2.0.5
1312 tuple : ^2.0.0
1413
1514dev_dependencies :
16- test : ^1.0 .0
15+ test : ^1.24 .0
1716 lints : ^6.0.0
You can’t perform that action at this time.
0 commit comments