<commit_before>type priv
(** private key representation *)

type pub
(** public key representation *)

val json_of_pub : pub -> Yojson.Basic.json

val priv_of_json : Yojson.Basic.json -> priv

val pem_of_pub : pub -> string

type storage
(** storage for keys *)

val create : unit -> storage

val add : storage -> priv -> string Lwt.t

val put : storage -> string -> priv -> bool Lwt.t

val del : storage -> string -> bool Lwt.t

val get : storage -> string -> pub option Lwt.t

val get_all : storage -> (string * pub) list Lwt.t

val decrypt : storage -> string -> Yojson.Basic.json -> Yojson.Basic.json Lwt.t

val pkcs1_decrypt : storage -> string -> Yojson.Basic.json -> Yojson.Basic.json Lwt.t

val pkcs1_sign : storage -> string -> Yojson.Basic.json -> Yojson.Basic.json Lwt.t<commit_msg>Add comments to keyring api<commit_after>type priv
(** private key representation *)

type pub
(** public key representation *)

val json_of_pub : pub -> Yojson.Basic.json

val priv_of_json : Yojson.Basic.json -> priv

val pem_of_pub : pub -> string

type storage
(** storage for keys *)

val create : unit -> storage
(** create a storage *)

val add : storage -> priv -> string Lwt.t
(** add key to storage *)

val put : storage -> string -> priv -> bool Lwt.t
(** update a key in storage *)

val del : storage -> string -> bool Lwt.t
(** delete a key from storage *)

val get : storage -> string -> pub option Lwt.t
(** retreive a public key from storage *)

val get_all : storage -> (string * pub) list Lwt.t
(** retrieve all public keys from storage *)

val decrypt : storage -> string -> Yojson.Basic.json -> Yojson.Basic.json Lwt.t

val pkcs1_decrypt : storage -> string -> Yojson.Basic.json -> Yojson.Basic.json Lwt.t

val pkcs1_sign : storage -> string -> Yojson.Basic.json -> Yojson.Basic.json Lwt.t
{'fraction_non_alphanumeric': 0.13103831204886174, 'fraction_numerical': 0.002220988339811216, 'mean_word_length': 3.2904761904761903, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2920356', 'n_tokens_mistral': 601, 'n_tokens_neox': 572, 'n_words': 202}