package pkcs11-driver

  1. Overview
  2. Docs
Bindings to the PKCS#11 cryptographic API

Install

Dune Dependency

Authors

Maintainers

Sources

pkcs11-v1.0.1.tbz
sha256=db6bed28e4a75cb3787d0b6feca954a91c9e52e678b8cc73c1058975b1846946
sha512=f764b356cac3dd7718003a158f2a4dad7b8caae981930ab9cfa674a08ebcf3583c531bfcca9ddbb593d0c8e5a64b52381f8c9c702c3a0d0d44000727b095c47a

doc/pkcs11-driver/Pkcs11_data/index.html

Module Pkcs11_dataSource

Data: input and output of encryption functions.

An element of type t is a structure made of a pointer to a C string, and its length. It is easy to convert this type to and from OCaml strings.

The reason we use this type is that some PKCS#11 functions require a two step interraction, in which one first gives a null pointer (with length 0) to a function, which modifies the length of the data. Then, the user allocates memory for this Data.t, and performs a second call to the function.

Sourcetype t
Sourceval to_string : t -> string
Sourceval of_string : string -> t
Sourceval string_of_raw : 'a Ctypes.ptr -> Unsigned.ULong.t -> string
Sourceval create : unit -> t

create () allocates a new t with length 0, and content the null pointer.

Sourceval allocate : t -> unit

allocate t updates the content of the t structure to point to freshly allocated memory.

Sourceval get_content : t -> Pkcs11_CK_BYTE.t Ctypes.ptr
Sourceval get_length : t -> P11_ulong.t
Sourceval get_length_addr : t -> P11_ulong.t Ctypes.ptr
OCaml

Innovation. Community. Security.