Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type ClientId = Text
- newtype Key = Key ByteString
- type ContentType = ByteString
- data PayloadInfo = PayloadInfo {}
- data HawkAlgo = (HawkAlgoCls alg, Show alg) => HawkAlgo alg
- class HawkAlgoCls a where
- newtype Key = Key ByteString
- data SHA1 :: * = SHA1
- data SHA256 :: * = SHA256
- readHawkAlgo :: String -> Maybe HawkAlgo
Documentation
Identifies a particular client so that their credentials can be looked up.
A user-supplied password or generated key.
type ContentType = ByteString Source #
Value of Content-Type
HTTP headers.
data PayloadInfo Source #
Payload data and content type bundled up for convenience.
A wrapper data type representing one of the supported HMAC
algorithms. Use HawkAlgo SHA1
or HawkAlgo SHA256
.
(HawkAlgoCls alg, Show alg) => HawkAlgo alg |
class HawkAlgoCls a where Source #
The class of HMAC algorithms supported by the Hawk
protocol. Users of the Hawk
module probably won't
directly need this.
hawkHash :: a -> ByteString -> ByteString Source #
Calculates the hash of a message. The result is encoded in Base64.
hawkMac :: a -> Key -> ByteString -> ByteString Source #
Calculates the hash-based MAC of a message. The result is encoded in Base64.
A user-supplied password or generated key.
SHA1 cryptographic hash algorithm
SHA256 cryptographic hash algorithm