mirror of
https://github.com/jonasroussel/dart_jsonwebtoken.git
synced 2025-05-17 08:05:54 +08:00
v2.7.1
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
## 2.7.1
|
||||
|
||||
- Migrating from `pedantic` to `lints`
|
||||
|
||||
## 2.7.0
|
||||
|
||||
- `parsing.dart` has been replaced by more accurate CryptoUtils functions `https://github.com/Ephenodrom/Dart-Basic-Utils`
|
||||
|
@ -1 +1 @@
|
||||
include: package:pedantic/analysis_options.yaml
|
||||
include: package:lints/core.yaml
|
||||
|
@ -511,7 +511,7 @@ class CryptoUtils {
|
||||
.map((line) => line.trim())
|
||||
.where((line) => line.isNotEmpty)
|
||||
.toList();
|
||||
var base64;
|
||||
String base64;
|
||||
if (checkHeader) {
|
||||
if (lines.length < 2 ||
|
||||
!lines.first.startsWith('-----BEGIN') ||
|
||||
@ -541,7 +541,7 @@ class CryptoUtils {
|
||||
static RSAPublicKey rsaPublicKeyFromDERBytes(Uint8List bytes) {
|
||||
var asn1Parser = ASN1Parser(bytes);
|
||||
var topLevelSeq = asn1Parser.nextObject() as ASN1Sequence;
|
||||
var publicKeySeq;
|
||||
ASN1Sequence publicKeySeq;
|
||||
if (topLevelSeq.elements![1].runtimeType == ASN1BitString) {
|
||||
var publicKeyBitString = topLevelSeq.elements![1] as ASN1BitString;
|
||||
|
||||
@ -696,8 +696,8 @@ class CryptoUtils {
|
||||
{bool pkcs8 = false}) {
|
||||
var asn1Parser = ASN1Parser(bytes);
|
||||
var topLevelSeq = asn1Parser.nextObject() as ASN1Sequence;
|
||||
var curveName;
|
||||
var x;
|
||||
String? curveName;
|
||||
Uint8List x;
|
||||
if (pkcs8) {
|
||||
// Parse the PKCS8 format
|
||||
var innerSeq = topLevelSeq.elements!.elementAt(1) as ASN1Sequence;
|
||||
@ -735,7 +735,7 @@ class CryptoUtils {
|
||||
x = privateKeyAsOctetString.valueBytes!;
|
||||
}
|
||||
|
||||
return ECPrivateKey(osp2i(x), ECDomainParameters(curveName));
|
||||
return ECPrivateKey(osp2i(x), ECDomainParameters(curveName!));
|
||||
}
|
||||
|
||||
///
|
||||
@ -751,7 +751,7 @@ class CryptoUtils {
|
||||
var algorithmIdentifierSequence = topLevelSeq.elements![0] as ASN1Sequence;
|
||||
var curveNameOi = algorithmIdentifierSequence.elements!.elementAt(1)
|
||||
as ASN1ObjectIdentifier;
|
||||
var curveName;
|
||||
String? curveName;
|
||||
var data = ObjectIdentifiers.getIdentifierByIdentifier(
|
||||
curveNameOi.objectIdentifierAsString);
|
||||
if (data != null) {
|
||||
@ -772,7 +772,7 @@ class CryptoUtils {
|
||||
}
|
||||
var x = pubBytes.sublist(1, (pubBytes.length / 2).round());
|
||||
var y = pubBytes.sublist(1 + x.length, pubBytes.length);
|
||||
var params = ECDomainParameters(curveName);
|
||||
var params = ECDomainParameters(curveName!);
|
||||
var bigX = decodeBigIntWithSign(1, x);
|
||||
var bigY = decodeBigIntWithSign(1, y);
|
||||
var pubKey = ECPublicKey(
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: dart_jsonwebtoken
|
||||
description: A dart implementation of the famous javascript library 'jsonwebtoken' (JWT).
|
||||
version: 2.7.0
|
||||
version: 2.7.1
|
||||
repository: https://github.com/jonasroussel/dart_jsonwebtoken
|
||||
homepage: https://github.com/jonasroussel/dart_jsonwebtoken#readme
|
||||
|
||||
@ -21,4 +21,4 @@ dependencies:
|
||||
ed25519_edwards: ^0.3.1
|
||||
|
||||
dev_dependencies:
|
||||
pedantic: ^1.11.0
|
||||
lints: ^2.0.1
|
||||
|
Reference in New Issue
Block a user