sig
module Error :
sig
type error_location = Subtable of string * int | Table | Any
type error =
File_not_found of string
| File_overwrite of string
| File_not_appendable of string
| File_not_writeable of string
| Bad_format of string * string
| Bad_password of Cryptodbm.Error.error_location
| Bad_signature of Cryptodbm.Error.error_location
| No_signature of Cryptodbm.Error.error_location
| Is_Closed of Cryptodbm.Error.error_location
| Is_Already_Open of Cryptodbm.Error.error_location
| No_subtable of string
| Subtable_exists of string
| Subtable_overflow
| Overwrite of string * Cryptodbm.Error.error_location
| Unbound of string * Cryptodbm.Error.error_location
| DB_Error of exn
| Corrupted of Cryptodbm.Error.error_location * string
| Backup_failure of exn
exception Error of Cryptodbm.Error.error
val loc2s : Cryptodbm.Error.error_location -> string
val error2s : Cryptodbm.Error.error -> string
end
type 'a table
type read
type full
type 'a subtable
val open_read :
?iterations:int ->
file:string ->
passwd:string -> signwd:string -> unit -> Cryptodbm.read Cryptodbm.table
val open_append :
?iterations:int ->
file:string ->
passwd:string ->
signwd:string ->
check_signature:bool -> unit -> Cryptodbm.full Cryptodbm.table
val open_create :
file:string ->
?overwrite:bool ->
?iterations:int ->
passwd:string ->
signwd:string ->
?max_extra_key:int ->
?max_extra_data:int ->
?max_extra_bindings:int ->
perm:int -> unit -> Cryptodbm.full Cryptodbm.table
val open_only_uncrypted :
?iterations:int ->
file:string -> signwd:string -> unit -> Cryptodbm.read Cryptodbm.table
val close : 'a Cryptodbm.table -> unit
val flush :
?backup:bool ->
?backup_name:string -> Cryptodbm.full Cryptodbm.table -> unit
val get_rootfile : 'a Cryptodbm.table -> string
val create_subtable :
Cryptodbm.full Cryptodbm.table ->
name:string ->
?iterations:int ->
passwd:string ->
signwd:string ->
?max_extra_key:int ->
?max_extra_data:int -> unit -> Cryptodbm.full Cryptodbm.subtable
val create_uncrypted_subtable :
?iterations:int ->
Cryptodbm.full Cryptodbm.table ->
name:string -> signwd:string -> unit -> Cryptodbm.full Cryptodbm.subtable
val open_subtable :
'a Cryptodbm.table ->
name:string ->
?iterations:int ->
passwd:string ->
signwd:string -> unit -> Cryptodbm.read Cryptodbm.subtable
val open_uncrypted_subtable :
?iterations:int ->
'a Cryptodbm.table ->
name:string -> signwd:string -> unit -> Cryptodbm.read Cryptodbm.subtable
val append_subtable :
Cryptodbm.full Cryptodbm.table ->
name:string ->
?iterations:int ->
passwd:string ->
signwd:string ->
check_signature:bool -> unit -> Cryptodbm.full Cryptodbm.subtable
val append_uncrypted_subtable :
?iterations:int ->
Cryptodbm.full Cryptodbm.table ->
name:string ->
signwd:string ->
check_signature:bool -> unit -> Cryptodbm.full Cryptodbm.subtable
val close_subtable : 'a Cryptodbm.subtable -> unit
val get_number : 'a Cryptodbm.subtable -> int
val get_name : 'a Cryptodbm.subtable -> string
val iter_subtables : 'a Cryptodbm.table -> (string -> int -> unit) -> unit
val iter_uncrypted_subtables :
'a Cryptodbm.table -> (string -> int -> unit) -> unit
val add :
?may_overwrite:bool ->
Cryptodbm.full Cryptodbm.subtable -> key:string -> data:string -> unit
val find : 'a Cryptodbm.subtable -> string -> string
val delete : Cryptodbm.full Cryptodbm.subtable -> string -> unit
val clear : Cryptodbm.full Cryptodbm.subtable -> unit
val iter : 'a Cryptodbm.subtable -> (string -> string -> unit) -> unit
val iterkey : 'a Cryptodbm.subtable -> (string -> unit) -> unit
val fold :
'a Cryptodbm.subtable -> 'b -> (string -> string -> 'b -> 'b) -> 'b
val iter_extra_bindings :
'a Cryptodbm.table -> (string -> string -> unit) -> unit
val export : Cryptodbm.read Cryptodbm.table -> binfile:string -> unit
val import : binfile:string -> dbfile:string -> unit
end