jose-0.12: JSON Object Signing and Encryption (JOSE) and JSON Web Token (JWT) library
Safe HaskellNone
LanguageGHC2021

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

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

Defined in Crypto.JOSE.JWS

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

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

Defined in Crypto.JOSE.JWS

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

Encode data to a compact representation.