mirror of
https://github.com/jonasroussel/dart_jsonwebtoken.git
synced 2025-08-01 17:01:33 +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
|
# Conventional directory for build outputs
|
||||||
build/
|
build/
|
||||||
|
|
||||||
|
# VSCode
|
||||||
|
.vscode/
|
||||||
|
|
||||||
# Directory created by dartdoc
|
# Directory created by dartdoc
|
||||||
doc/api/
|
doc/api/
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
## 2.1.1
|
||||||
|
|
||||||
|
- Fixing `_pkcs8ECPublicKey` to work with pointycastle 3.0.1
|
||||||
|
|
||||||
## 2.1.0
|
## 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)
|
- 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:typed_data';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:pointycastle/pointycastle.dart' hide ECPoint, ECCurve;
|
import 'package:pointycastle/pointycastle.dart';
|
||||||
import 'package:pointycastle/ecc/ecc_fp.dart';
|
import 'package:pointycastle/ecc/ecc_fp.dart' as ecc_fp;
|
||||||
|
|
||||||
import 'utils.dart';
|
import 'utils.dart';
|
||||||
|
|
||||||
@ -215,17 +215,12 @@ ECPublicKey? _pkcs8ECPublicKey(Uint8List bytes) {
|
|||||||
final bigX = decodeBigIntWithSign(1, x);
|
final bigX = decodeBigIntWithSign(1, x);
|
||||||
final bigY = decodeBigIntWithSign(1, y);
|
final bigY = decodeBigIntWithSign(1, y);
|
||||||
final params = ECDomainParameters(curve);
|
final params = ECDomainParameters(curve);
|
||||||
final ecCurve = ECCurve(
|
|
||||||
null,
|
|
||||||
params.curve.a?.toBigInteger(),
|
|
||||||
params.curve.b?.toBigInteger(),
|
|
||||||
);
|
|
||||||
|
|
||||||
return ECPublicKey(
|
return ECPublicKey(
|
||||||
ECPoint(
|
ecc_fp.ECPoint(
|
||||||
ecCurve,
|
params.curve as ecc_fp.ECCurve,
|
||||||
ecCurve.fromBigInteger(bigX),
|
params.curve.fromBigInteger(bigX) as ecc_fp.ECFieldElement?,
|
||||||
ecCurve.fromBigInteger(bigY),
|
params.curve.fromBigInteger(bigY) as ecc_fp.ECFieldElement?,
|
||||||
compressed,
|
compressed,
|
||||||
),
|
),
|
||||||
params,
|
params,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: dart_jsonwebtoken
|
name: dart_jsonwebtoken
|
||||||
description: A dart implementation of the famous javascript library 'jsonwebtoken' (JWT).
|
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
|
repository: https://github.com/jonasroussel/jsonwebtoken
|
||||||
homepage: https://github.com/jonasroussel/jsonwebtoken#readme
|
homepage: https://github.com/jonasroussel/jsonwebtoken#readme
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user