Base class for an ASN.1 value whose type definition is known.

This class can store a Ceylon value corresponding to the ASN.1 value, but if that's not feasible (as for example in OCTET STRING: contents possibly long but easy to decode), that Ceylon value may be calculated on the fly from the encoding.

Asn1Value(Byte[] encoded, IdentityInfo identityInfo, Integer lengthOctetsOffset, Integer contentsOctetsOffset, Boolean violatesDer, Value? storedValue = null)
  • storedValue = null

    The Ceylon value corresponding to the ASN.1 value or null if no Ceylon value is stored.

asn1Stringshared actual default String asn1String

String representation that can be used in an ASN.1 listing. (Still in flux)

defaultTagshared formal Tag defaultTag

The tag that an instance of this class has when used without tag in a specification.

valshared Value val

The Ceylon value that is “contained” in this ASN.1 value. If storedValue is null, it will be decoded each time it is accessed.

Inherited Attributes
Attributes inherited from: GenericAsn1Value
Attributes inherited from: Object
hash, string
decodeshared default Value decode()

Subclasses must implement this if the decoded value is not stored in the instance and thus must be decoded each time val is called.

If the decoded value is stored in the instance, then this method need not be refined.

Inherited Methods
Methods inherited from: Object