package cryptokit

  1. Overview
  2. Docs

The Hexa module supports the encoding and decoding of binary data as hexadecimal strings. This is a popular format for transmitting keys in textual form.

val encode : unit -> transform

Return a transform that encodes its input in hexadecimal. The output is twice as long as the input, and contains no spaces or newlines.

val decode : unit -> transform

Return a transform that encodes its input in hexadecimal. The output is twice as long as the input, and contains no spaces or newlines.

Return a transform that decodes its input from hexadecimal. The output is twice as short as the input. Blanks (spaces, tabs, newlines) in the input are ignored. Raise Error Bad_encoding if the input contains characters other than hexadecimal digits and blanks.

OCaml

Innovation. Community. Security.