Netasn1.ValueSourcetype value = | Bool of boolBoolean (primitive)
*)| Integer of int_valueInteger (primitive)
*)| Enum of int_valueEnumeration (primitive)
*)| Real of real_valueFloating-point number, using either base 2 or base 10 (primitive)
*)| Bitstring of bitstring_valueBit strings (primitive or constructed)
*)| Octetstring of stringOctet strings (primitive or constructed)
*)| NullNull (primitive)
*)| Seq of value listSequences (records or arrays) (constructed)
*)| Set of value listSets (constructed)
*)| Tagptr of tag_class * int * pc * Netstring_tstring.tstring_polybox * int * intPointer to an undecoded value that was implicitly tagged. The tag_class can be Application, Context, or Private.
| Tag of tag_class * int * pc * valueExplicit tag (primitive or constructed depending on inner value)
*)| ITag of tag_class * int * valueImplicit tag (never returned by the decoder, but needed for encoding such tags)
*)| OID of int array| ROID of int array| ObjectDescriptor of stringA placeholder with a comment (primitive)
*)| External of value listSomething complex I don't understand (constructed)
*)| Embedded_PDV of value listSomething complex I don't understand (constructed)
*)| NumericString of stringString made of digits and spaces (primitive or constructed)
*)| PrintableString of stringA small subset of ASCII (primitive or constructed)
*)| TeletexString of string| VideotexString of string| VisibleString of string7 bit ASCII w/o control characters (primitive or constructed)
*)| IA5String of string7 bit ASCII (primitive or constructed)
*)| GraphicString of stringISO-2022-encoded string w/o control characters
*)| GeneralString of stringISO-2022-encoded string
*)| UniversalString of stringAny ISO-10646-1 character string represented as UTF-32-BE (primitive or constructed). Roughly, ISO-10646-1 equals to Unicode.
*)| BMPString of stringAny ISO-10646-1 character string from only the basic multilingual plane, i.e. with code points <= 65535, represented as UTF-16-BE (primitive or constructed)
*)| UTF8String of stringAny ISO-10646-1 character string represented as UTF-8 (primitive or constructed)
*)| CharString of stringA complicated description of an arbitrary charset encoding (primitive or constructed)
*)| UTCTime of time_valueLike GeneralizedTime but less precise, and with 2-digit year
*)| GeneralizedTime of time_valueCalendar date with time of day, including timezone (primitive)
*)Returns the type, or None for Tag, ITag and Tagptr
Get an integer as bytes
Get an integer in base 256 notation, big endian. Negative values are represented using two's complement (i.e. the first array element is >= 128). The empty array means 0.
Get an integer in base 256 notation, big endian. Negative values are represented using two's complement (i.e. the first array element is >= 128). The empty array means 0.
Get an integer as int if representable, or raise Out_of_range
Get an integer as int if representable, or raise Out_of_range
Get an integer as int32 if representable, or raise Out_of_range
Get an integer as int32 if representable, or raise Out_of_range
Get an integer as int64 if representable, or raise Out_of_range
Get an integer as int64 if representable, or raise Out_of_range
Create an int
Create an int
Create an int from a base 256 number, big endian, signed
Reals are not really supported ;-(
Get the byte representation of the real
In some contexts it is usual that trailing zero bits are truncated.
Get the number of bits
Get the number of bits
Get the data. The last byte may be partial. The order of the bits in every byte: bit 7 (MSB) contains the first bit
Get the data. The last byte may be partial. The order of the bits in every byte: bit 7 (MSB) contains the first bit
Get the bitstring as bool array. If size is specified the array will have exactly this number of bits (by dropping exceeding data, or by adding false at the end)
Get the bitstring as bool array. If size is specified the array will have exactly this number of bits (by dropping exceeding data, or by adding false at the end)
Get the representation
Get the representation
Get the bitstring from a bool array
Get the bitstring from a bool array
Get the bitstring from a string and the total number of bits. The bits are taken from the beginning of the string (MSB first). If the string is shorter than the number of bits suggests, the remaining bits are assumed to be zero. If the string is longer than the number of bits suggests, the exceeding data is ignored.
Get the bitstring from a string and the total number of bits. The bits are taken from the beginning of the string (MSB first). If the string is shorter than the number of bits suggests, the remaining bits are assumed to be zero. If the string is longer than the number of bits suggests, the exceeding data is ignored.
Truncates the biggest trailing part that only consist of 0 bits
Time values referring to the local time zone are not supported
Whether this is for UTCTime (`U) or GeneralizedTime (`G)
Whether this is for UTCTime (`U) or GeneralizedTime (`G)
Get the raw time string
Get the raw time string
Get the time. Notes:
Get the time. Notes:
Create a time value for UTCTime. This function is restricted to years between 1950 and 2049.
Create a time value for UTCTime. This function is restricted to years between 1950 and 2049.
Create a time value for GeneralizedTime. digits is the number of fractional (subsecond) digits