package awa

  1. Overview
  2. Docs
type t =
  1. | Plaintext
  2. | Aes128_ctr
  3. | Aes192_ctr
  4. | Aes256_ctr
  5. | Aes128_cbc
  6. | Aes192_cbc
  7. | Aes256_cbc
  8. | Chacha20_poly1305
val aead : t -> bool
type cipher_key =
  1. | Plaintext_key
  2. | Aes_ctr_key of Mirage_crypto.AES.CTR.key * Mirage_crypto.AES.CTR.ctr
  3. | Aes_cbc_key of Mirage_crypto.AES.CBC.key * string
  4. | Chacha20_poly1305_key of Mirage_crypto.Chacha20.key * Mirage_crypto.Chacha20.key
type key = {
  1. cipher : t;
  2. cipher_key : cipher_key;
}
val to_string : t -> string
val of_string : string -> (t, string) result
val key_len : t -> int
val iv_len : t -> int
val block_len : t -> int
val mac_len : t -> int
val known : string -> bool
val enc_dec : bool -> len:bool -> int32 -> key -> string -> (string * key, string) result
val encrypt : len:bool -> int32 -> key -> string -> string * key
val decrypt : len:bool -> int32 -> key -> string -> (string * key, string) result
val preferred : t list
OCaml

Innovation. Community. Security.