Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Crypto.Paseto.Token
Synopsis
- newtype Footer = Footer {}
- newtype ImplicitAssertion = ImplicitAssertion {}
- newtype Payload = Payload {}
- data Token v p where
- data SomeToken
- = SomeTokenV3Local !(Token V3 Local)
- | SomeTokenV3Public !(Token V3 Public)
- | SomeTokenV4Local !(Token V4 Local)
- | SomeTokenV4Public !(Token V4 Public)
- toSomeToken :: Token v p -> SomeToken
Documentation
Footer consisting of unencrypted free-form data.
The footer's contents may be JSON or some other structured data, but it doesn't have to be.
When a PASETO token is constructed, the footer is authenticated, but not encrypted (i.e. its integrity is protected, but it is not made confidential). In authenticated encryption schemes, this is referred to as "associated data".
Note that this type's Eq
instance performs a constant-time equality
check.
Constructors
Footer | |
Fields |
Instances
newtype ImplicitAssertion Source #
Unencrypted authenticated data which is not stored in the PASETO token.
When a PASETO token is constructed, the implicit assertion is authenticated, but it is not stored in the token. This is useful if one wants to associate some data that should remain confidential.
Note that this type's Eq
instance performs a constant-time equality
check.
Constructors
ImplicitAssertion | |
Fields |
Instances
Show ImplicitAssertion Source # | |
Defined in Crypto.Paseto.Token Methods showsPrec :: Int -> ImplicitAssertion -> ShowS # show :: ImplicitAssertion -> String # showList :: [ImplicitAssertion] -> ShowS # | |
Eq ImplicitAssertion Source # | |
Defined in Crypto.Paseto.Token Methods (==) :: ImplicitAssertion -> ImplicitAssertion -> Bool # (/=) :: ImplicitAssertion -> ImplicitAssertion -> Bool # |
Raw PASETO token payload.
Note that this type's Eq
instance performs a constant-time equality
check.
Constructors
Payload | |
Fields |
Constructors
TokenV3Local | PASETO version 3 local token. |
TokenV3Public | PASETO version 3 public token. |
TokenV4Local | PASETO version 4 local token. |
TokenV4Public | PASETO version 4 public token. |