opium

OCaml web framework
IN THIS PACKAGE
Module Opium . Cookie . Signer
type t

Constructors

make

val make : ?salt:string -> string -> t

make ?salt secret returns a new signer that will sign values with secret

Signing functions

sign

val sign : t -> string -> string

sign signer value signs the string value with signer

unsign

val unsign : t -> string -> string option

unsign signer value unsigns a signed string value with signer.Httpaf

To avoid time attacks, this function is constant time, it will iterate through all the characters of value, even if it is not the same.