Asn1PrimitiveOctetString
ASN.1 OCTET STRING 0x04 (BERTags.OCTET_STRING) containing data, which does not decode to an Asn1Element
Parameters
the data to hold
Properties
Lazily-evaluated DER-encoded representation of this ASN.1 element
Length (already properly encoded into a byte array for writing as ASN.1) of the contained data. For a primitive, this is just the size of the held bytes. For a structure, it is the sum of the number of bytes needed to encode all held child nodes.
Total number of bytes required to represent the ths element, when encoding to ASN.1.
Functions
Transforms this Asn1Primitive' into an Asn1BitString, assuming it was encoded as BIT STRING
transforms this Asn1Primitive into an Asn1String subtype based on its tag
Convenience function to cast this element to an Asn1EncapsulatingOctetString
Convenience function to cast this element to an Asn1ExplicitlyTagged
Convenience function to cast this element to an Asn1Primitive
Convenience function to cast this element to an Asn1PrimitiveOctetString
Convenience function to cast this element to an Asn1Sequence
Convenience function to cast this element to an Asn1Structure
Generic decoding function. Verifies that this Asn1Primitive's tag matches assertTag and transforms its content as per transform
Exception-free version of decode
Decode the Asn1Primitive as a Asn1Integer
Exception-free version of decodeToAsn1Integer
decodes this Asn1Primitive's content into an Boolean. assertTag defaults to Asn1Element.Tag.BOOL, but can be overridden (for implicitly tagged booleans, for example)
Exception-free version of decodeToBoolean
decodes this Asn1Primitive's content into an Instant if it is encoded as UTC TIME or GENERALIZED TIME
Exception-free version of decodeToInstant
decodes this Asn1Primitive's content into an Int. assertTag defaults to Asn1Element.Tag.INT, but can be overridden (for implicitly tagged integers, for example)
Exception-free version of decodeToInt
decodes this Asn1Primitive's content into a Long. assertTag defaults to Asn1Element.Tag.INT, but can be overridden (for implicitly tagged longs, for example)
Exception-free version of decodeToLong
Decodes this Asn1Primitive's content into a String.
Exception-free version of decodeToString
decodes this Asn1Primitive's content into an UInt√. assertTag defaults to Asn1Element.Tag.INT, but can be overridden (for implicitly tagged unsigned integers, for example)
Exception-free version of decodeToUInt
decodes this Asn1Primitive's content into an ULong. assertTag defaults to Asn1Element.Tag.INT, but can be overridden (for implicitly tagged unsigned longs, for example)
Exception-free version of decodeToULong
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
Convenience method to directly produce an HEX string of this element's ASN.1 representation
Returns the actual type of this object inside the Asn1Element class hierarchy T will either be Asn1Primitive/Asn1PrimitiveOctetString or Asn1Structure/Asn1EncapsulatingOctetString
Creates a new implicitly tagged ASN.1 Element from this ASN.1 Element. NOTE: The TagClass of the provided tag will be used! If you want the result to have TagClass.CONTEXT_SPECIFIC, use element withImplicitTag (tag withClass TagClass.CONTEXT_SPECIFIC)
!. If a CONSTRUCTED Tag is applied to an ASN.1 Primitive, the CONSTRUCTED bit is overridden and set to zero.
Creates a new implicitly tagged ASN.1 Element from this ASN.1 Structure. If the provided template's tagClass is not set, the class of the resulting structure defaults to TagClass.CONTEXT_SPECIFIC. If a CONSTRUCTED Tag is applied to an ASN.1 Primitive, the CONSTRUCTED bit is overridden and set to zero.
Creates a new implicitly tagged ASN.1 Element from this ASN.1 Element. Sets the class of the resulting structure to TagClass.CONTEXT_SPECIFIC