-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | crypto tokens -- -- Encrypted tokens/tickets to keep state in the client side. @package crypto-token @version 0.0.2 -- | Encrypted tokens/tickets to keep state in the client side. For -- security reasons, Storable data types MUST be fixed-size when -- stored (i.e. serialized into the memory). module Crypto.Token -- | Configuration for token manager. data Config Config :: Int -> Int -> Config -- | The interval to generate a new secret and remove the oldest one in -- minutes. [interval] :: Config -> Int -- | Maximum size of secret entries. Minimum is 256 and maximum is 32767. [maxEntries] :: Config -> Int -- | Default configuration to update secrets in 30 minutes and keep them -- for 10 days. defaultConfig :: Config -- | The abstract data type for token manager. data TokenManager -- | Spawning a token manager. spawnTokenManager :: Config -> IO TokenManager -- | Killing a token manager. killTokenManager :: TokenManager -> IO () -- | Encrypting a target value to get a token. encryptToken :: (Storable a, ByteArray ba) => TokenManager -> a -> IO ba -- | Decrypting a token to get a target value. decryptToken :: (Storable a, ByteArray ba) => TokenManager -> ba -> IO (Maybe a) instance Foreign.Storable.Storable Crypto.Token.Header