Creates an $(MONO END OF CONTENT) by default
Creates a DERElement from the supplied bytes, inferring that the first byte is the type tag. The supplied ubyte[] array is "chomped" by reference, so the original array will grow shorter as DERElements are generated.
Creates a DERElement from the supplied bytes, inferring that the first byte is the type tag. Unlike the construct that accepts a ubyte[] reference, this constructor does not "chomp" the array. This constructor expects the encoded bytes to encode only one $(DERElement). If there are any remaining bytes after decoding, an exception is thrown.
Creates a DERElement from the supplied bytes, inferring that the first byte is the type tag. The supplied ubyte[] array is read, starting from the index specified by bytesRead, and increments bytesRead by the number of bytes read.
This differs from this.value in that this.value only returns the value octets, whereas this.toBytes returns the type tag, length tag / octets, and the value octets, all concatenated.
Decodes a $(MONO wstring) of UTF-16 characters.
Encodes a $(MONO wstring) of UTF-16 characters.
Decodes an array of bools representing a string of bits.
Encodes an array of bools representing a string of bits.
Decodes a bool.
Encodes a bool
Decodes a $(MONO CharacterString), which is a constructed data type, defined in the https://www.itu.int, International Telecommunications Union's https://www.itu.int/rec/T-REC-X.680/en, X.680.
Encodes a $(MONO CharacterString), which is a constructed data type, defined in the https://www.itu.int, International Telecommunications Union's https://www.itu.int/rec/T-REC-X.680/en, X.680.
Decodes a https://dlang.org/phobos/std_datetime_date.html#.DateTime, DateTime. The value is just the ASCII character representation of the UTC-formatted timestamp.
Encodes a https://dlang.org/phobos/std_datetime_date.html#.DateTime, DateTime. The value is just the ASCII character representation of the UTC-formatted timestamp.
Decodes an $(MONO EmbeddedPDV), which is a constructed data type, defined in the https://www.itu.int, International Telecommunications Union's https://www.itu.int/rec/T-REC-X.680/en, X.680.
Encodes an $(MONO EmbeddedPDV), which is a constructed data type, defined in the https://www.itu.int, International Telecommunications Union's https://www.itu.int/rec/T-REC-X.680/en, X.680.
"Decodes" an $(MONO END OF CONTENT), by which I mean: returns nothing, but throws exceptions if the element is not correct.
Decodes a signed integer, which represents a selection from an $(MONO ENUMERATION) of choices.
Encodes an $(MONO ENUMERATED) type from an integer.
Decodes an $(MONO EXTERNAL).
Encodes an $(MONO EXTERNAL).
Decodes a string containing only ASCII characters. Deprecated, according to page 182 of the Dubuisson book.
Encodes a string containing only ASCII characters. Deprecated, according to page 182 of the Dubuisson book.
Decodes a https://dlang.org/phobos/std_datetime_date.html#.DateTime, DateTime. The value is just the ASCII character representation of the https://www.iso.org/iso-8601-date-and-time-format.html, ISO 8601-formatted timestamp.
Decodes an ASCII string that contains only characters between and including 0x20 and 0x75. Deprecated, according to page 182 of the Dubuisson book.
Encodes an ASCII string that may contain only characters between and including 0x20 and 0x75. Deprecated, according to page 182 of the Dubuisson book.
Decodes a signed integer.
Encodes a signed integral type
Decodes a string that only contains ASCII characters.
Encodes a string that may only contain ASCII characters.
"Decodes" a null, by which I mean: returns nothing, but throws exceptions if the element is not correct.
Decodes a string, where the characters of the string are limited to 0 - 9 and $(MONO SPACE).
Encodes a string, where the characters of the string are limited to 0 - 9 and space.
Decodes an ObjectDescriptor, which is a string consisting of only graphical characters. In fact, ObjectDescriptor is actually implicitly just a $(MONO GraphicString)! The formal specification for an ObjectDescriptor is:
Encodes an ObjectDescriptor, which is a string consisting of only graphical characters. In fact, ObjectDescriptor is actually implicitly just a $(MONO GraphicString)! The formal specification for an ObjectDescriptor is:
Decodes an $(MONO OBJECT IDENTIFIER). See $(MONO source/types/universal/objectidentifier.d) for information about the ObjectIdentifier class (aliased as OID).
Encodes an $(MONO OBJECT IDENTIFIER). See $(MONO source/types/universal/objectidentifier.d) for information about the ObjectIdentifier class (aliased as $(OID)).
Decodes an $(MONO OCTET STRING) into an unsigned byte array.
Encodes an $(MONO OCTET STRING) from an unsigned byte (ubyte) array.
Decodes a string that will only contain characters a-z, A-Z, 0-9, space, apostrophe, parentheses, comma, minus, plus, period, forward slash, colon, equals, and question mark.
Encodes a string that may only contain characters a-z, A-Z, 0-9, space, apostrophe, parentheses, comma, minus, plus, period, forward slash, colon, equals, and question mark.
Decodes a floating-point type.
Encodes a floating-point type, using base-2 binary encoding.
Decodes a $(MONO RELATIVE OBJECT IDENTIFIER).
Encodes a $(MONO RELATIVE OBJECT IDENTIFIER).
Decodes a sequence of elements
Encodes a sequence of elements
Decodes a set of elements
Encodes a set of elements
Literally just returns the value bytes.
Literally just sets the value bytes.
This differs from this.value in that this.value only returns the value octets, whereas this.toBytes returns the type tag, length tag / octets, and the value octets, all concatenated.
Decodes the value to UTF-8 characters.
Encodes a UTF-8 string to bytes.
Decodes a $(MONO dstring) of UTF-32 characters.
Encodes a $(MONO dstring) of UTF-32 characters.
Literally just returns the value bytes.
Literally just sets the value bytes.
Decodes a string that only contains characters between and including 0x20 and 0x7E. (Honestly, I don't know how this differs from $(MONO GraphicalString).)
Encodes a string that only contains characters between and including 0x20 and 0x7E. (Honestly, I don't know how this differs from $(MONO GraphicalString).)
The unit of encoding and decoding for Distinguished Encoding Rules (DER).
There are three parts to an element encoded according to the Distinguished Encoding Rules (DER):
They appear in the binary encoding in that order, and as such, the encoding scheme is sometimes described as "TLV," which stands for Type-Length-Value.
This class provides a properties for getting and setting bit fields of the type tag, but most of it is functionality for encoding data per the specification.
As an example, this is what encoding a simple INTEGER looks like:
And this is what decoding looks like: