Package-level declarations
Types
ASN.1 BIT STRING
Interface providing convenience methods to decode from ASN.1. Especially useful when companion objects of classes implementing Asn1Encodable implement it.
Base ASN.1 data class. Can either be a primitive (holding a value), or a structure (holding other ASN.1 elements)
ASN.1 OCTET STRING 0x04 (BERTags.OCTET_STRING) containing an Asn1Element
Interface providing methods to encode to ASN.1
Interface describing an ASN.1 OCTET STRING. This is really more of a crutch, since an octet string is either an
ASN.1 OCTET STRING 0x04 (BERTags.OCTET_STRING) containing data, which does not decode to an Asn1Element
ASN.1 SEQUENCE 0x30 (DERTags.DER_SEQUENCE)
ASN.1 SET 0x31 (DERTags.DER_SET)
ASN.1 SET OF 0x31 (DERTags.DER_SET)
ASN.! String class used as wrapper do discriminate between different ASN.1 string types
ASN.1 structure. Contains no data itself, but holds zero or more children
Explicit ASN.1 Tag. Can contain any number of children
ASN.1 TIME (required since GENERALIZED TIME and UTC TIME exist)
Class Providing a DSL for creating arbitrary ASN.1 structures. You will almost certainly never use it directly, but rather use it as follows:
Adds oid to the implementing class
ASN.1 OBJECT IDENTIFIER featuring the most cursed encoding of numbers known to man, which probably surfaced due to an ungodly combination of madness, cruelty and a twisted sense of humour. Courtesy of what were most probably tormented souls to begin with.
Functions
Exception-free version of decode
Encode as a four-byte array
Encode as an eight-byte array
Produces a GENERALIZED TIME as Asn1Primitive
Produces a UTC TIME as Asn1Primitive
Prepends 0x00 to this ByteArray for encoding it into a BIT STRING. Useful for implicit tagging
Encodes a signed Long correctly to a compact byte array
Produces an INTEGER as Asn1Primitive
Produces a BOOLEAN as Asn1Primitive
Produces a BIT STRING as Asn1Primitive
Produces an OCTET STRING as Asn1Primitive
Drops or adds zero bytes at the start until the size is reached
Parses the provides input into a single Asn1Element
Decode the Asn1Primitive as a BigInteger
Exception-free version of readBigInteger
decodes this Asn1Primitive's content into an ByteArray, assuming it was encoded as BIT STRING
Exception-free version of readBitString
decodes this Asn1Primitive's content into an Boolean
decodes this Asn1Primitive's content into an Instant if it is encoded as UTC TIME or GENERALIZED TIME
Exception-free version of readInstant
decodes this Asn1Primitive's content into an Int
Exception-free version of readInt
decodes this Asn1Primitive's content into a Long
Exception-free version of readLong
decodes this Asn1Primitive to null (i.e. verifies the tag to be BERTags.ASN1_NULL and the content to be empty
Name seems odd, but this is just an exception-free version of readNull
decodes this Asn1Primitive's content into an ObjectIdentifier
decodes this Asn1Primitive's content into an Asn1String
Exception-free version of readString
Runs block inside catching and encapsulates any thrown exception in an Asn1Exception unless it already is one
Returns this Asn1Tagged children, if its tag matches tag
Exception-free version of verifyTag