ASN1Utils class

Utils class holding different methods to ease the handling of ANS1Objects and their byte representation.

Constructors

ASN1Utils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

calculateIndefiniteLength(Uint8List bytes, int startPosition) int
Calculates the indefinite length of the ASN1 object. Throws an ArgumentError if the end of content octets is not found.
calculateValueStartPosition(Uint8List encodedBytes) int
Calculates the start position of the value bytes for the given encodedBytes.
decodeLength(Uint8List encodedBytes) int
Calculates the length of the value bytes for the given encodedBytes.
ecPrivateKeyFromDerBytes(Uint8List bytes, {bool pkcs8 = false}) ECPrivateKey
encodeLength(int length, {bool longform = false}) Uint8List
Encode the given length to byte representation.
getBytesFromPEMString(String pem, {bool checkHeader = true}) Uint8List
hasIndefiniteLengthEnding(Uint8List bytes) bool
Checks if the given bytes ends with 0x00, 0x00
isASN1Tag(int i) bool
isConstructed(int i) bool
Checks if the given int i is constructed according to www.bouncycastle.org/asn1_layman_93.txt section 3.2.
osp2i(Iterable<int> bytes, {Endian endian = Endian.big}) BigInt