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 Asn1Real

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
43
44
45
46
47
48
49
50
51
52
53
54
55
module juptune.asn1.decode.bcd.encoding;

struct Asn1Real
{
    /++ FUNCTIONS ++/
    
    /// Converts the raw bytes into native double. 
    Result asDouble(double number);
    /// Decodes the passed in ASN.1 content bytes. 
    Result fromDecoding(Asn1Ruleset ruleset)(MemoryReader mem, Asn1Real result, Asn1Identifier ident);
    /// Returns: a new Asn1Real that represents -double.infinity 
    static Asn1Real minusInfinity();
    /// Returns: a new Asn1Real that represents -0 
    static Asn1Real minusZero();
    /// Returns: a new Asn1Real that represents double.nan 
    static Asn1Real notANumber();
    /// Returns: a new Asn1Real that represents +double.infinity 
    static Asn1Real plusInfinity();
    /// Returns: a new Asn1Real that represents +0 
    static Asn1Real plusZero();
    
    /++ ENUMS ++/
    
    ///
    enum Base : ubyte
    {
        ///
        base2 = cast(ubyte)0u, 
        ///
        base8 = cast(ubyte)1u, 
        ///
        base16 = cast(ubyte)2u, 
        ///
        _reserved_ = cast(ubyte)3u, 
        ///
        base10 = cast(ubyte)255u
    }
    ///
    enum Special : ushort
    {
        ///
        notSpecial = cast(ushort)0u, 
        ///
        plusZeroNoContentBytes = cast(ushort)65535u, 
        ///
        plusInfinity = cast(ushort)64u, 
        ///
        minusInfinity = cast(ushort)65u, 
        ///
        notANumber = cast(ushort)66u, 
        ///
        minusZero = cast(ushort)67u
    }
    
}

Documentation

Represents an ASN.1 REAL.

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

Enums

Name Description
Base
Special

Functions

Name Description
asDouble

Converts the raw bytes into native double.

fromDecoding

Decodes the passed in ASN.1 content bytes.

minusInfinity

Returns: a new Asn1Realthat represents -double.infinity

minusZero

Returns: a new Asn1Realthat represents -0

notANumber

Returns: a new Asn1Realthat represents double.nan

plusInfinity

Returns: a new Asn1Realthat represents +double.infinity

plusZero

Returns: a new Asn1Realthat represents +0