sig
exception Decoding_error of string
exception Encoding_error of string
type readbyte = ?peek:bool -> unit -> char
type writebyte = char -> unit
type ber_class = Universal | Application | Context_specific | Private
type ber_length = Definite of int | Indefinite
type ber_val_header = {
ber_class : Lber.ber_class;
ber_primitive : bool;
ber_tag : int;
ber_length : Lber.ber_length;
}
type berval =
Boolean of bool
| Int of Int32.t
| Bitstring of string
| Octetstring of string
| Null
| Oid of string
| Odt of string
| Real of float
| Enum of int32
| Utf8string of string
| RelativeOid of string
| Sequence of Lber.berval list
| Set of Lber.berval list
| Charstring of string
| Time of string
val readbyte_of_string : string -> ?peek:bool -> unit -> char
val decode_ber_header : ?peek:bool -> Lber.readbyte -> Lber.ber_val_header
val encode_ber_header : Lber.ber_val_header -> string
val read_contents :
?peek:bool -> Lber.readbyte -> Lber.ber_length -> string
val decode_ber_bool :
?peek:bool ->
?cls:Lber.ber_class ->
?tag:int -> ?contents:string option -> Lber.readbyte -> bool
val encode_ber_bool : ?cls:Lber.ber_class -> ?tag:int -> bool -> string
val decode_ber_int32 :
?peek:bool ->
?cls:Lber.ber_class ->
?tag:int -> ?contents:string option -> Lber.readbyte -> int32
val encode_ber_int32 : ?cls:Lber.ber_class -> ?tag:int -> int32 -> string
val decode_ber_enum :
?peek:bool ->
?cls:Lber.ber_class ->
?tag:int -> ?contents:string option -> Lber.readbyte -> int32
val encode_ber_enum : ?cls:Lber.ber_class -> ?tag:int -> int32 -> string
val decode_ber_octetstring :
?peek:bool ->
?cls:Lber.ber_class ->
?tag:int -> ?contents:string option -> Lber.readbyte -> string
val encode_ber_octetstring :
?cls:Lber.ber_class -> ?tag:int -> string -> string
val decode_ber_null :
?peek:bool ->
?cls:Lber.ber_class ->
?tag:int -> ?contents:string option -> Lber.readbyte -> unit
val encode_ber_null : ?cls:Lber.ber_class -> ?tag:int -> unit -> string
val encode_berval_list :
?buf:Buffer.t -> ('a -> string) -> 'a list -> string
val decode_berval_list :
?lst:'a list -> (Lber.readbyte -> 'a) -> Lber.readbyte -> 'a list
end