snap-1.1.0.0: Top-level package for the Snap Web Framework

Safe HaskellNone
LanguageHaskell98

Snap.Snaplet.Session.Common

Description

This module contains functionality common among multiple back-ends.

Synopsis

Documentation

data RNG #

High speed, mutable random number generator state

mkRNG :: IO RNG #

Create a new RNG

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

Perform given action, mutating the RNG state

randomToken :: Int -> RNG -> IO ByteString #

Generates a random salt of given length

mkCSRFToken :: RNG -> IO Text #

Generate a randomized CSRF token