module Value:sig
..end
type
pc =
| |
Primitive |
| |
Constructed |
type
value =
| |
Bool of |
(* |
Boolean (primitive)
| *) |
| |
Integer of |
(* |
Integer (primitive)
| *) |
| |
Enum of |
(* |
Enumeration (primitive)
| *) |
| |
Real of |
(* |
Floating-point number, using either base 2 or base 10 (primitive)
| *) |
| |
Bitstring of |
(* |
Bit strings (primitive or constructed)
| *) |
| |
Octetstring of |
(* |
Octet strings (primitive or constructed)
| *) |
| |
Null |
(* |
Null (primitive)
| *) |
| |
Seq of |
(* |
Sequences (records or arrays) (constructed)
| *) |
| |
Set of |
(* |
Sets (constructed)
| *) |
| |
Tagptr of |
(* |
Pointer to an undecoded value that was implicitly tagged.
The
tag_class can be Application , Context , or Private . | *) |
| |
Tag of |
(* |
Explicit tag (primitive or constructed depending on inner value)
| *) |
| |
ITag of |
(* |
Implicit tag (never returned by the decoder, but needed for
encoding such tags)
| *) |
| |
OID of |
|||
| |
ROID of |
|||
| |
ObjectDescriptor of |
(* |
A placeholder with a comment (primitive)
| *) |
| |
External of |
(* |
Something complex I don't understand (constructed)
| *) |
| |
Embedded_PDV of |
(* |
Something complex I don't understand (constructed)
| *) |
| |
NumericString of |
(* |
String made of digits and spaces (primitive or constructed)
| *) |
| |
PrintableString of |
(* |
A small subset of ASCII (primitive or constructed)
| *) |
| |
TeletexString of |
|||
| |
VideotexString of |
|||
| |
VisibleString of |
(* |
7 bit ASCII w/o control characters (primitive or constructed)
| *) |
| |
IA5String of |
(* |
7 bit ASCII (primitive or constructed)
| *) |
| |
GraphicString of |
(* |
ISO-2022-encoded string w/o control characters
| *) |
| |
GeneralString of |
(* |
ISO-2022-encoded string
| *) |
| |
UniversalString of |
(* |
Any ISO-10646-1 character string represented as UTF-32-BE
(primitive or constructed). Roughly, ISO-10646-1 equals to
Unicode.
| *) |
| |
BMPString of |
(* |
Any 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 |
(* |
Any ISO-10646-1 character string represented as UTF-8
(primitive or constructed)
| *) |
| |
CharString of |
(* |
A complicated description of an arbitrary charset encoding
(primitive or constructed)
| *) |
| |
UTCTime of |
(* |
Like GeneralizedTime but less precise, and with 2-digit year
| *) |
| |
GeneralizedTime of |
(* |
Calendar date with time of day, including timezone (primitive)
| *) |
type
tag_class =
| |
Universal |
| |
Application |
| |
Context |
| |
Private |
type
int_value
type
real_value
type
bitstring_value
type
time_value
typetime_subtype =
[ `G | `U ]
val type_of_value : value -> Netasn1.Type_name.type_name option
None
for Tag
, ITag
and Tagptr
val get_int_repr : int_value -> string
val get_int_b256 : int_value -> int array
val get_int : int_value -> int
int
if representable, or raise Out_of_range
val get_int32 : int_value -> int32
int32
if representable, or raise Out_of_range
val get_int64 : int_value -> int64
int64
if representable, or raise Out_of_range
val int : int -> int_value
val int32 : int32 -> int_value
val int64 : int64 -> int_value
val int_b256 : int array -> int_value
val get_real_repr : real_value -> string
val get_bitstring_size : bitstring_value -> int
val get_bitstring_data : bitstring_value -> string
val get_bitstring_bits : ?size:int -> bitstring_value -> bool array
size
is specified the array
will have exactly this number of bits (by dropping exceeding data,
or by adding false
at the end)val get_bitstring_repr : bitstring_value -> string
val bitstring_of_bits : bool array -> bitstring_value
val bitstring_of_string : string -> int -> bitstring_value
val truncate_trailing_zero_bits : bitstring_value -> bitstring_value
val get_time_subtype : time_value -> time_subtype
`U
) or GeneralizedTime (`G
)val get_time_repr : time_value -> string
val get_time : time_value -> Netdate.t
val utctime : Netdate.t -> time_value
val gentime : digits:int -> Netdate.t -> time_value
digits
is the number
of fractional (subsecond) digitsval equal : value -> value -> bool
Tag
and Tagptr
are considered differentTagptr
is checked by comparing the equality of the substringSet
is so far not compared as set, but as sequence (i.e. order
matters)