Safe Haskell | None |
---|---|
Language | Haskell98 |
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
- class FromCompact a where
- fromCompact :: (AsError e, MonadError e m) => [ByteString] -> m a
- decodeCompact :: (FromCompact a, AsError e, MonadError e m) => ByteString -> m a
- class ToCompact a where
- toCompact :: a -> [ByteString]
- encodeCompact :: ToCompact a => a -> ByteString
Documentation
class FromCompact a where Source #
Data that can be parsed from a compact representation.
fromCompact :: (AsError e, MonadError e m) => [ByteString] -> m a Source #
Instances
HasParams a => FromCompact (JWS Identity () a) Source # | |
Defined in Crypto.JOSE.JWS 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.
toCompact :: a -> [ByteString] Source #
encodeCompact :: ToCompact a => a -> ByteString Source #
Encode data to a compact representation.