snap-0.9.0: Snap: A Haskell Web Framework: project starter executable and glue code library

Safe HaskellNone

Snap.Snaplet.Session.Common

Description

This module contains functionality common among multiple back-ends.

Synopsis

Documentation

data RNG Source

High speed, mutable random number generator state

mkRNG :: IO RNGSource

Create a new RNG

withRNG :: RNG -> (GenIO -> IO a) -> IO aSource

Perform given action, mutating the RNG state

randomToken :: Int -> RNG -> IO ByteStringSource

Generates a random salt of given length

mkCSRFToken :: RNG -> IO TextSource

Generate a randomized CSRF token