123456789101112131415161718192021222324252627282930313233343536373839404142module juptune.asn1.decode.bcd.encoding;
struct Asn1Identifier
{
/++ ALIASES ++/
/// Type used to store the tag number
alias Tag = ulong;
/++ FUNCTIONS ++/
/// Returns: The tag's class.
Asn1Identifier.Class class_();
/// Returns: The content byte's encoding.
Asn1Identifier.Encoding encoding();
/// Returns: The numerical tag itself.
ulong tag();
/++ ENUMS ++/
/// The class, as defined by ASN.1
enum Class : ubyte
{
/// The tag is well-defined across all ASN.1 encodings.
universal = cast(ubyte)0u,
/// The tag has a specific meaning to a specific/particular set of applications.
application = cast(ubyte)1u,
/// The tag has a unique meaning under a very specific context that isn't general enough for application or private_ .
contextSpecific = cast(ubyte)2u,
/// The tag has a private organisation-wide meaning that's common across all of its tooling/applications.
private_ = cast(ubyte)3u
}
/// How to interpet the content bytes.
enum Encoding : ubyte
{
/// The content bytes are in a bespoke format, and likely need a specailised decoder.
primitive = cast(ubyte)0u,
/// The content bytes contain other ASN.1 records, and don't neccesarily need a decoder (beyond mapping them to D types properly).
constructed = cast(ubyte)1u
}
}
Represents the identifier byte(s) of an ASN.1 record.
This type holds no references to external memory.
| Name | Description |
|---|---|
| Tag |
Type used to store the tag number |
| Name | Description |
|---|---|
| Class |
The class, as defined by ASN.1 |
| Encoding |
How to interpet the content bytes. |
| Name | Description |
|---|---|
| class_ |
Returns: The tag's class. |
| encoding |
Returns: The content byte's encoding. |
| tag |
Returns: The numerical tag itself. |