Skip to content

Commit

Permalink
fix: wrong cast in ObjectIdentifier.toAsn1() (pull request #14 from N…
Browse files Browse the repository at this point in the history
…icolaVerbeeck)

Fix wrong cast in ObjectIdentifier.toAsn1()
  • Loading branch information
rbellens committed Nov 3, 2022
2 parents bb76649 + c6bdd76 commit 95e838c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/objectidentifier.dart
Expand Up @@ -32,7 +32,7 @@ class ObjectIdentifier {
}

ASN1ObjectIdentifier toAsn1() {
var bytes = <int?>[];
var bytes = <int>[];
bytes.add(nodes.first * 40 + nodes[1]);
for (var v in nodes.skip(2)) {
var w = [];
Expand All @@ -46,7 +46,7 @@ class ObjectIdentifier {
bytes.addAll(w.skip(1).toList().reversed.map((v) => v + 128));
bytes.add(w.first);
}
return ASN1ObjectIdentifier(bytes as List<int>);
return ASN1ObjectIdentifier(bytes);
}

@override
Expand Down

0 comments on commit 95e838c

Please sign in to comment.