mirror of
https://github.com/jonasroussel/dart_jsonwebtoken.git
synced 2025-05-19 09:06:15 +08:00
v2.1.1
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -9,6 +9,9 @@ pubspec.lock
|
||||
# Conventional directory for build outputs
|
||||
build/
|
||||
|
||||
# VSCode
|
||||
.vscode/
|
||||
|
||||
# Directory created by dartdoc
|
||||
doc/api/
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
## 2.1.1
|
||||
|
||||
- Fixing `_pkcs8ECPublicKey` to work with pointycastle 3.0.1
|
||||
|
||||
## 2.1.0
|
||||
|
||||
- When an undefined error occur `JWTUndefinedError` is thrown containing the original error in `error` property (https://github.com/jonasroussel/jsonwebtoken/issues/9)
|
||||
|
@ -1,8 +1,8 @@
|
||||
import 'dart:typed_data';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:pointycastle/pointycastle.dart' hide ECPoint, ECCurve;
|
||||
import 'package:pointycastle/ecc/ecc_fp.dart';
|
||||
import 'package:pointycastle/pointycastle.dart';
|
||||
import 'package:pointycastle/ecc/ecc_fp.dart' as ecc_fp;
|
||||
|
||||
import 'utils.dart';
|
||||
|
||||
@ -215,17 +215,12 @@ ECPublicKey? _pkcs8ECPublicKey(Uint8List bytes) {
|
||||
final bigX = decodeBigIntWithSign(1, x);
|
||||
final bigY = decodeBigIntWithSign(1, y);
|
||||
final params = ECDomainParameters(curve);
|
||||
final ecCurve = ECCurve(
|
||||
null,
|
||||
params.curve.a?.toBigInteger(),
|
||||
params.curve.b?.toBigInteger(),
|
||||
);
|
||||
|
||||
return ECPublicKey(
|
||||
ECPoint(
|
||||
ecCurve,
|
||||
ecCurve.fromBigInteger(bigX),
|
||||
ecCurve.fromBigInteger(bigY),
|
||||
ecc_fp.ECPoint(
|
||||
params.curve as ecc_fp.ECCurve,
|
||||
params.curve.fromBigInteger(bigX) as ecc_fp.ECFieldElement?,
|
||||
params.curve.fromBigInteger(bigY) as ecc_fp.ECFieldElement?,
|
||||
compressed,
|
||||
),
|
||||
params,
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: dart_jsonwebtoken
|
||||
description: A dart implementation of the famous javascript library 'jsonwebtoken' (JWT).
|
||||
version: 2.1.0
|
||||
version: 2.1.1
|
||||
repository: https://github.com/jonasroussel/jsonwebtoken
|
||||
homepage: https://github.com/jonasroussel/jsonwebtoken#readme
|
||||
|
||||
|
Reference in New Issue
Block a user