package cryptokit

  1. Overview
  2. Docs

The Stream module provides classes that implement the ARCfour stream cipher, and the wrapping of a stream cipher as a general transform. The classes can be composed in a Lego-like fashion, facilitating the integration of new stream ciphers.

class type stream_cipher = object ... end

Abstract interface for a stream cipher.

Wraps an arbitrary stream cipher as a transform. The transform has input and output block size of 1.

class arcfour : string -> stream_cipher

The ARCfour (``alleged RC4'') stream cipher. The argument is the key, and must be of length 1 to 256. This stream cipher works by xor-ing the input with the output of a key-dependent pseudo random number generator. Thus, decryption is the same function as encryption.

OCaml

Innovation. Community. Security.