Skip to content

Commit 31a1438

Browse files
Merge pull request #19 from konstantinullrich/feature/replace-deprecated-pc-features
Update deprecated PointyCastle features
2 parents edc45da + 35d6bb7 commit 31a1438

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.1.3
2+
- Update deprecated PointyCastle features
3+
14
## 1.1.2
25
- Update dependencies
36
- Update tests

lib/src/rsa/private_key.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ class RSAPrivateKey implements PrivateKey {
133133
var privateKeySeq = ASN1Sequence();
134134
var modulus = ASN1Integer(_privateKey.n);
135135
var publicExponent = ASN1Integer(BigInt.parse('65537'));
136-
var privateExponent = ASN1Integer(_privateKey.d);
136+
var privateExponent = ASN1Integer(_privateKey.privateExponent);
137137
var p = ASN1Integer(_privateKey.p);
138138
var q = ASN1Integer(_privateKey.q);
139-
var dP = _privateKey.d % (_privateKey.p - BigInt.from(1));
139+
var dP = _privateKey.privateExponent % (_privateKey.p - BigInt.from(1));
140140
var exp1 = ASN1Integer(dP);
141-
var dQ = _privateKey.d % (_privateKey.q - BigInt.from(1));
141+
var dQ = _privateKey.privateExponent % (_privateKey.q - BigInt.from(1));
142142
var exp2 = ASN1Integer(dQ);
143143
var iQ = _privateKey.q.modInverse(_privateKey.p);
144144
var co = ASN1Integer(iQ);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: crypton
22
description: A simple Dart library for asymmetric encryption and digital signatures
3-
version: 1.1.2
3+
version: 1.1.3
44
homepage: https://github.com/konstantinullrich
55
repository: https://github.com/konstantinullrich/crypton
66
issue_tracker: https://github.com/konstantinullrich/crypton/issues

0 commit comments

Comments
 (0)