ASN1Integer class

ASN1Integer encoding / decoding.

Note that asn1 integers can be arbitrary precision, so a BigInt is used to hold the int value. Convenience methods are provided to deal with int or BigInt

Inheritance
Implementers

Constructors

ASN1Integer(BigInt valueAsBigInteger, {int tag = INTEGER_TYPE})
ASN1Integer.fromBytes(Uint8List bytes)
ASN1Integer.fromInt(int x, {int tag = INTEGER_TYPE})

Properties

encodedBytes Uint8List
Get the encoded byte representation for this object. This can trigger calling the subclasss _encode method if the object has not yet been encoded
no setterinherited
extendedTag int?
no setterinherited
hasExtendedTag bool
no setterinherited
hashCode int
The hash code for this object.
no setteroverride
intValue int
no setter
isEncoded bool
Check if the encoding is ready.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag int
The BER tag representing this object
finalinherited
totalEncodedByteLength int
The total length of this object in bytes - including its value bytes and the encoded tag and length bytes.
no setterinherited
valueAsBigInteger BigInt
latefinal

Methods

contentBytes() Uint8List
Returns the real content of a tag. This might be equal to valueBytes for some tags.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toHexString() String
inherited
toString() String
A string representation of this object.
override
valueBytes() Uint8List
Return just the value bytes.
inherited

Operators

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

Static Methods

decodeBigInt(Uint8List bytes) BigInt
Given an ASN1 encoded integer return the integer value of the byte stream.
decodeInt(Uint8List bytes) int
encodeBigInt(BigInt number) Uint8List
encodeInt(int x) Uint8List