package sihl

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Encrypting plaintexts and ciphertext manipulation

val xor : char list -> char list -> char list option

xor b1 b2 does bitwise XORing of b1 and b2. Returns None if non-ASCII characters are used or the two lists differ in length.

val decrypt_with_salt : salted_cipher:char list -> salt_length:int -> char list option

decrypt_with_salt ~salted_cipher ~salt_length splits the prepended salt off of salted_cipher and uses it to XOR the rest of salted_cipher. Since xor is used, returns None if the cipher and salt_length differ in length.

OCaml

Innovation. Community. Security.