hsoz-0.0.1.0: Iron, Hawk, Oz: Web auth protocols

Safe HaskellNone
LanguageHaskell2010

Network.Iron.Util

Contents

Description

Miscellaneous shortcut functions, mostly for internal use.

Synopsis

Base64

b64 :: ByteArrayAccess a => a -> ByteString Source #

Shorthand for encode in Base64.

b16 :: ByteString -> ByteString Source #

Shorthand for hex encode

Time parsing

parseExpMsec :: ByteString -> Maybe NominalDiffTime Source #

Reads a positive integer time value in milliseconds. This is for parsing ttls or expiry times written as milliseconds since the unix epoch.

Error handling

justRight :: e -> Maybe a -> Either e a Source #

Converts Maybe to Either.

rightJust :: Either e a -> Maybe a Source #

Converts Either to Maybe.