Skip to content

Commit 94052b9

Browse files
committed
add to private key
1 parent a015f16 commit 94052b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jwk/lib/jwk.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ class Jwk {
369369
case 'EC':
370370
final type = const <String, KeyPairType>{
371371
'P-256': KeyPairType.p256,
372+
'secp256k1': KeyPairType.p256k,
372373
'P-384': KeyPairType.p384,
373374
'P-521': KeyPairType.p521,
374375
}[crv];
@@ -430,6 +431,7 @@ class Jwk {
430431
case 'EC':
431432
final type = const <String, KeyPairType>{
432433
'P-256': KeyPairType.p256,
434+
'secp256k1': KeyPairType.p256k,
433435
'P-384': KeyPairType.p384,
434436
'P-521': KeyPairType.p521,
435437
}[crv];
@@ -560,6 +562,7 @@ class Jwk {
560562
if (keyPair is EcKeyPairData) {
561563
final crv = const <KeyPairType, String>{
562564
KeyPairType.p256: 'P-256',
565+
KeyPairType.p256k: 'secp256k1',
563566
KeyPairType.p384: 'P-384',
564567
KeyPairType.p521: 'P-521',
565568
}[keyPair.type];

0 commit comments

Comments
 (0)