package bap-byteweight
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=a6e80853aaaa26b7ca564d9878891d7146ec1c83852541387c1bba1ad036b8ea
md5=13f2cb1e3b9d90348852252fb0f2d09f
doc/bap-byteweight/Bap_byteweight_signatures/index.html
Module Bap_byteweight_signatures
Provides signatures storage
type error = [
| `Corrupted of string
(*Signature file is corrupted
*)| `No_signatures
(*Signature file is not found
*)| `No_entry of string
(*Corresponding entry not found
*)| `Sys_error of string
(*System error has occurred
*)
]
Error conditions
val save :
?comp:string ->
mode:string ->
path:string ->
Bap.Std.arch ->
Regular.Std.bytes ->
(unit, error) Core_kernel.Result.t
save ?comp ~mode ~path arch data
store signatures data in the database of signatures specified by the path
parameter. The triple arch-comp-mode
defines a key for the created entry. If an entry with the same name existed, then it would be overwritten with the new data. If the database, doesn't exist, then it will be created and the specified destination.
val load :
?comp:string ->
?path:string ->
mode:string ->
Bap.Std.arch ->
(Regular.Std.bytes, error) Core_kernel.Result.t
load ?comp ?path ~mode arch
finds a signature for the specified arch-comp-path
triple.
If path
is not set, the the signatures are looked up first in default_path
and, if not found, in system_path
.
Since 2.3.0 the path search has changed to look into two locations.
default path for the user's signatures database.
Since 2.3.0 it is pointed to the user-specific location, not to the system-wide. See also system_path
.
val string_of_error : error -> string
a human readable representation of an error.