Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Structs Asn1Identifier

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
module 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
    }
    
}

Documentation

Represents the identifier byte(s) of an ASN.1 record.

This type holds no references to external memory.

Aliases

Name Description
Tag

Type used to store the tag number

Enums

Name Description
Class

The class, as defined by ASN.1

Encoding

How to interpet the content bytes.

Functions

Name Description
class_

Returns: The tag's class.

encoding

Returns: The content byte's encoding.

tag

Returns: The numerical tag itself.