Skip to content

Commit 9609eaa

Browse files
authored
Merge pull request #46 from jerson/ecc
feat: Initial support for ECC
2 parents 403a13f + 970fa40 commit 9609eaa

File tree

17 files changed

+321
-66
lines changed

17 files changed

+321
-66
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
## 3.5.0
3+
4+
- Updated binaries to v1.6.0 to support ECC Key generation, see KeyOptions: Algorithm and Curve
5+
26
## 3.4.3
37

48
- Updated binaries to v1.5.5 to support mixed go libraries (openpgp and fast-rsa)
22.6 KB
Binary file not shown.
17.3 KB
Binary file not shown.
21.3 KB
Binary file not shown.
22.6 KB
Binary file not shown.

example/lib/generate.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'package:flutter/foundation.dart';
44
import 'package:flutter/material.dart';
55
import 'package:flutter/widgets.dart';
66

7-
import 'package:openpgp/openpgp.dart';
7+
import 'package:openpgp/openpgp.dart' as OpenPGP;
88
import 'package:openpgp_example/shared/button_widget.dart';
99
import 'package:openpgp_example/shared/title_widget.dart';
1010

@@ -21,7 +21,7 @@ class Generate extends StatefulWidget {
2121
}
2222

2323
class _GenerateState extends State<Generate> {
24-
KeyPair _keyPair = KeyPair("", "");
24+
OpenPGP.KeyPair _keyPair = OpenPGP.KeyPair("", "");
2525

2626
@override
2727
Widget build(BuildContext context) {
@@ -36,9 +36,11 @@ class _GenerateState extends State<Generate> {
3636
key: Key("action"),
3737
result: _keyPair.privateKey,
3838
onPressed: () async {
39-
var keyOptions = KeyOptions()..rsaBits = 2048;
40-
var keyPair = await OpenPGP.generate(
41-
options: Options()
39+
var keyOptions = OpenPGP.KeyOptions()
40+
..rsaBits = 2048
41+
..algorithm = OpenPGP.Algorithm.EDDSA;
42+
var keyPair = await OpenPGP.OpenPGP.generate(
43+
options: OpenPGP.Options()
4244
..name = 'test'
4345
..email = 'test@test.com'
4446
..passphrase = 'test'

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ packages:
247247
path: ".."
248248
relative: true
249249
source: path
250-
version: "3.4.3"
250+
version: "3.5.0"
251251
package_config:
252252
dependency: transitive
253253
description:

ios/libopenpgp_bridge.a

67.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)