-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Made a number of APIs not-nullable - Made a number of fields final where they could be - Added types to a few public APIs - Enabled and fixed a bunch of new lints - Moved part files to the lib/src dir - Require Dart 3
Showing
50 changed files
with
233 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
include: package:lints/recommended.yaml | ||
include: package:dart_flutter_team_lints/analysis_options.yaml | ||
|
||
# This package was created before these constant rules were best practice. | ||
linter: | ||
rules: | ||
constant_identifier_names: false | ||
lines_longer_than_80_chars: false | ||
non_constant_identifier_names: false | ||
use_super_parameters: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,28 @@ | ||
library asn1lib; | ||
|
||
import 'dart:typed_data'; | ||
import 'dart:convert'; | ||
import 'dart:typed_data'; | ||
|
||
part 'asn1integer.dart'; | ||
part 'asn1enumerated.dart'; | ||
|
||
part 'asn1object.dart'; | ||
part 'asn1application.dart'; | ||
|
||
part 'asn1util.dart'; | ||
part 'asn1octetstring.dart'; | ||
part 'asn1exception.dart'; | ||
part 'asn1sequence.dart'; | ||
part 'asn1length.dart'; | ||
part 'asn1parser.dart'; | ||
part 'asn1constants.dart'; | ||
part 'asn1null.dart'; | ||
part 'asn1boolean.dart'; | ||
part 'asn1set.dart'; | ||
|
||
part 'asn1objectidentifier.dart'; | ||
part 'asn1bitstring.dart'; | ||
part 'asn1printablestring.dart'; | ||
part 'asn1numericstring.dart'; | ||
part 'asn1utf8string.dart'; | ||
part 'asn1ia5string.dart'; | ||
part 'asn1utctime.dart'; | ||
part 'asn1bmpstring.dart'; | ||
part 'asn1generalizedtime.dart'; | ||
part 'asn1teletextstring.dart'; | ||
|
||
part 'asn1ipaddress.dart'; | ||
part 'src/asn1application.dart'; | ||
part 'src/asn1bitstring.dart'; | ||
part 'src/asn1bmpstring.dart'; | ||
part 'src/asn1boolean.dart'; | ||
part 'src/asn1constants.dart'; | ||
part 'src/asn1enumerated.dart'; | ||
part 'src/asn1exception.dart'; | ||
part 'src/asn1generalizedtime.dart'; | ||
part 'src/asn1ia5string.dart'; | ||
part 'src/asn1integer.dart'; | ||
part 'src/asn1ipaddress.dart'; | ||
part 'src/asn1length.dart'; | ||
part 'src/asn1null.dart'; | ||
part 'src/asn1numericstring.dart'; | ||
part 'src/asn1object.dart'; | ||
part 'src/asn1objectidentifier.dart'; | ||
part 'src/asn1octetstring.dart'; | ||
part 'src/asn1parser.dart'; | ||
part 'src/asn1printablestring.dart'; | ||
part 'src/asn1sequence.dart'; | ||
part 'src/asn1set.dart'; | ||
part 'src/asn1teletextstring.dart'; | ||
part 'src/asn1utctime.dart'; | ||
part 'src/asn1utf8string.dart'; | ||
part 'src/asn1util.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,29 @@ | ||
part of asn1lib; | ||
part of '../asn1lib.dart'; | ||
|
||
/// | ||
/// An ASN1 Boolean | ||
/// | ||
class ASN1Boolean extends ASN1Object { | ||
bool? _boolValue; | ||
late final bool booleanValue; | ||
|
||
static final ASN1Boolean ASN1TrueBoolean = ASN1Boolean(true); | ||
static final ASN1Boolean ASN1FalseBoolean = ASN1Boolean(false); | ||
|
||
bool? get booleanValue => _boolValue; | ||
|
||
// ASN1Boolean(this._boolValue,{tag: BOOLEAN_TYPE}):super(tag:BOOLEAN_TYPE) { | ||
ASN1Boolean(this._boolValue, {tag = BOOLEAN_TYPE}) : super(tag: tag) { | ||
ASN1Boolean(this.booleanValue, {super.tag = BOOLEAN_TYPE}) { | ||
_valueByteLength = 1; | ||
} | ||
|
||
ASN1Boolean.fromBytes(Uint8List bytes) : super.fromBytes(bytes) { | ||
var b = bytes[_valueStartPosition]; | ||
_boolValue = (b == BOOLEAN_TRUE_VALUE); | ||
booleanValue = (b == BOOLEAN_TRUE_VALUE); | ||
} | ||
|
||
@override | ||
Uint8List? _encode() { | ||
Uint8List _encode() { | ||
super._encodeHeader(); | ||
super._setValueBytes( | ||
[_boolValue == true ? BOOLEAN_TRUE_VALUE : BOOLEAN_FALSE_VALUE]); | ||
return _encodedBytes; | ||
[booleanValue ? BOOLEAN_TRUE_VALUE : BOOLEAN_FALSE_VALUE]); | ||
return _encodedBytes!; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
part of asn1lib; | ||
part of '../asn1lib.dart'; | ||
|
||
/// | ||
/// An enum is encoded as an Integer. | ||
/// | ||
class ASN1Enumerated extends ASN1Integer { | ||
ASN1Enumerated(int i, {tag = ENUMERATED_TYPE}) | ||
ASN1Enumerated(int i, {int tag = ENUMERATED_TYPE}) | ||
: super(BigInt.from(i), tag: tag); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
part of asn1lib; | ||
part of '../asn1lib.dart'; | ||
|
||
/// | ||
/// An ASN1 Exception | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 6 additions & 7 deletions
13
lib/asn1teletextstring.dart → lib/src/asn1teletextstring.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters