mirror of
https://github.com/jonasroussel/dart_jsonwebtoken.git
synced 2025-08-06 13:51:08 +08:00
v2.13.0
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
## 2.13.0
|
||||||
|
|
||||||
|
- Fix invalid ECDSA signature for keys that are not a multiple of 8 (e.g. secp521r1) (https://github.com/jonasroussel/dart_jsonwebtoken/issues/51)
|
||||||
|
|
||||||
## 2.12.2
|
## 2.12.2
|
||||||
|
|
||||||
- Add testable date times (https://github.com/jonasroussel/dart_jsonwebtoken/issues/50)
|
- Add testable date times (https://github.com/jonasroussel/dart_jsonwebtoken/issues/50)
|
||||||
|
@ -331,8 +331,8 @@ class ECDSAAlgorithm extends JWTAlgorithm {
|
|||||||
final len = privateKey.size;
|
final len = privateKey.size;
|
||||||
final bytes = Uint8List(len * 2);
|
final bytes = Uint8List(len * 2);
|
||||||
|
|
||||||
bytes.setRange(0, len, rBytes.reversed);
|
bytes.setRange(len - rBytes.length, len, rBytes.reversed);
|
||||||
bytes.setRange(len, len * 2, sBytes.reversed);
|
bytes.setRange((len * 2) - sBytes.length, len * 2, sBytes.reversed);
|
||||||
|
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ class ECPrivateKey extends JWTKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
key = _key;
|
key = _key;
|
||||||
size = (_params.curve.fieldSize / 8).round();
|
size = (_params.curve.fieldSize / 8).ceil();
|
||||||
}
|
}
|
||||||
|
|
||||||
ECPrivateKey.raw(pc.ECPrivateKey _key) {
|
ECPrivateKey.raw(pc.ECPrivateKey _key) {
|
||||||
@ -86,7 +86,7 @@ class ECPrivateKey extends JWTKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
key = _key;
|
key = _key;
|
||||||
size = (_params.curve.fieldSize / 8).round();
|
size = (_params.curve.fieldSize / 8).ceil();
|
||||||
}
|
}
|
||||||
ECPrivateKey.clone(ECPrivateKey _key)
|
ECPrivateKey.clone(ECPrivateKey _key)
|
||||||
: key = _key.key,
|
: key = _key.key,
|
||||||
|
@ -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.12.2
|
version: 2.13.0
|
||||||
repository: https://github.com/jonasroussel/dart_jsonwebtoken
|
repository: https://github.com/jonasroussel/dart_jsonwebtoken
|
||||||
homepage: https://github.com/jonasroussel/dart_jsonwebtoken#readme
|
homepage: https://github.com/jonasroussel/dart_jsonwebtoken#readme
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user