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 Asn1LongLength

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
module juptune.asn1.decode.bcd.encoding;

struct Asn1LongLength
{
    /++ FUNCTIONS ++/
    
    ///
    Asn1LongLength fromNumberGC(T)(T number);
    /// Constructs an Asn1LongLength using a slice to external memory - this memory containing the raw length bytes used within an encoded ASN.1 record. 
    static Asn1LongLength fromUnownedBytes(const const ubyte[] lengthBytes);
    /// Determines whether this length can be converted into a native 64-bit number. 
    bool isAtMost64Bits();
    /// Converts the raw length bytes into a native ulong. 
    ulong length();
    /// Notes: As per the ASN.1 encoding, these bytes are always in big endian order. 
    const ubyte[] lengthBytes();
    
    /++ MANIFEST CONSTANTS ++/
    
    ///
    enum int MAX_BYTES = 127;
    ///
    enum int MIN_BYTES = 1;
    
}

Documentation

Represents the length of an ASN.1 record in the "long form", which can encode very, very large numbers.

This type contains slices to exteral memory, so please be aware of data lifetimes.

Constants

Name Description
MAX_BYTES
MIN_BYTES

Functions

Name Description
fromNumberGC
fromUnownedBytes

Constructs an Asn1LongLengthusing a slice to external memory - this memory containing the raw length bytes used within an encoded ASN.1 record.

isAtMost64Bits

Determines whether this length can be converted into a native 64-bit number.

length

Converts the raw length bytes into a native ulong.

lengthBytes

Notes: As per the ASN.1 encoding, these bytes are always in big endian order.