package pkcs11-driver

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

Install

Dune Dependency

Authors

Maintainers

Sources

pkcs11-v1.0.0.tbz
sha256=eee2e67fff116d747d1d0f6229af9e952cbb4f9a56765c069c63c1e1bbbc67a3
sha512=3a1090b0cd53b09dffb4c2a2d591e290ff3fe9add1217797f9746a1a6af0d41239b217f1dd45354e3ee457ff007d68bb4d8d83f07001d6ad9870e7aaba4fd434

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.