jose-0.8.0.0: Javascript Object Signing and Encryption and JSON Web Token library

Safe HaskellNone
LanguageHaskell98

Crypto.JOSE.Compact

Description

JWS, JWE and some related specifications provide for "compact" representations of certain types. This module defines classes and functions for working with such data.

Synopsis

Documentation

class FromCompact a where Source #

Data that can be parsed from a compact representation.

Methods

fromCompact :: (AsError e, MonadError e m) => [ByteString] -> m a Source #

Instances
HasParams a => FromCompact (JWS Identity () a) Source # 
Instance details

Defined in Crypto.JOSE.JWS

Methods

fromCompact :: (AsError e, MonadError e m) => [ByteString] -> m (JWS Identity () a) Source #

decodeCompact :: (FromCompact a, AsError e, MonadError e m) => ByteString -> m a Source #

Decode a compact representation.

class ToCompact a where Source #

Data that can be converted to a compact representation.

Methods

toCompact :: a -> [ByteString] Source #

Instances
HasParams a => ToCompact (JWS Identity () a) Source # 
Instance details

Defined in Crypto.JOSE.JWS

Methods

toCompact :: JWS Identity () a -> [ByteString] Source #

encodeCompact :: ToCompact a => a -> ByteString Source #

Encode data to a compact representation.