package awa

  1. Overview
  2. Docs

Module Awa.CipherSource

Sourcetype t =
  1. | Plaintext
  2. | Aes128_ctr
  3. | Aes192_ctr
  4. | Aes256_ctr
  5. | Aes128_cbc
  6. | Aes192_cbc
  7. | Aes256_cbc
  8. | Chacha20_poly1305
Sourceval aead : t -> bool
Sourcetype 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
Sourcetype key = {
  1. cipher : t;
  2. cipher_key : cipher_key;
}
Sourceval to_string : t -> string
Sourceval of_string : string -> (t, string) result
Sourceval key_len : t -> int
Sourceval iv_len : t -> int
Sourceval block_len : t -> int
Sourceval mac_len : t -> int
Sourceval known : string -> bool
Sourceval enc_dec : bool -> len:bool -> int32 -> key -> string -> (string * key, string) result
Sourceval encrypt : len:bool -> int32 -> key -> string -> string * key
Sourceval decrypt : len:bool -> int32 -> key -> string -> (string * key, string) result
Sourceval preferred : t list
OCaml

Innovation. Community. Security.