Safe Haskell | None |
---|---|
Language | Haskell2010 |
JOSE error types.
Synopsis
- data Error
- = AlgorithmNotImplemented
- | AlgorithmMismatch String
- | KeyMismatch Text
- | KeySizeTooSmall
- | OtherPrimesNotSupported
- | RSAError Error
- | CryptoError CryptoError
- | CompactDecodeError CompactDecodeError
- | JSONDecodeError String
- | NoUsableKeys
- | JWSCritUnprotected
- | JWSNoValidSignatures
- | JWSInvalidSignature
- | JWSNoSignatures
- class AsError r where
- _Error :: Prism' r Error
- _AlgorithmNotImplemented :: Prism' r ()
- _AlgorithmMismatch :: Prism' r String
- _KeyMismatch :: Prism' r Text
- _KeySizeTooSmall :: Prism' r ()
- _OtherPrimesNotSupported :: Prism' r ()
- _RSAError :: Prism' r Error
- _CryptoError :: Prism' r CryptoError
- _CompactDecodeError :: Prism' r CompactDecodeError
- _JSONDecodeError :: Prism' r String
- _NoUsableKeys :: Prism' r ()
- _JWSCritUnprotected :: Prism' r ()
- _JWSNoValidSignatures :: Prism' r ()
- _JWSInvalidSignature :: Prism' r ()
- _JWSNoSignatures :: Prism' r ()
- data InvalidNumberOfParts = InvalidNumberOfParts Natural Natural
- expectedParts :: Getter InvalidNumberOfParts Natural
- actualParts :: Getter InvalidNumberOfParts Natural
- data CompactTextError = CompactTextError Natural UnicodeException
- data CompactDecodeError
- _CompactInvalidNumberOfParts :: Prism' CompactDecodeError InvalidNumberOfParts
- _CompactInvalidText :: Prism' CompactDecodeError CompactTextError
Documentation
All the errors that can occur.
AlgorithmNotImplemented | A requested algorithm is not implemented |
AlgorithmMismatch String | A requested algorithm cannot be used |
KeyMismatch Text | Wrong type of key was given |
KeySizeTooSmall | Key size is too small |
OtherPrimesNotSupported | RSA private key with >2 primes not supported |
RSAError Error | RSA encryption, decryption or signing error |
CryptoError CryptoError | Various cryptonite library error cases |
CompactDecodeError CompactDecodeError | Wrong number of parts in compact serialisation |
JSONDecodeError String | JSON (Aeson) decoding error |
NoUsableKeys | No usable keys were found in the key store |
JWSCritUnprotected | |
JWSNoValidSignatures |
|
JWSInvalidSignature |
|
JWSNoSignatures |
|
Instances
Eq Error Source # | |
Show Error Source # | |
AsError Error Source # | |
Defined in Crypto.JOSE.Error _Error :: Prism' Error Error Source # _AlgorithmNotImplemented :: Prism' Error () Source # _AlgorithmMismatch :: Prism' Error String Source # _KeyMismatch :: Prism' Error Text Source # _KeySizeTooSmall :: Prism' Error () Source # _OtherPrimesNotSupported :: Prism' Error () Source # _RSAError :: Prism' Error Error0 Source # _CryptoError :: Prism' Error CryptoError Source # _CompactDecodeError :: Prism' Error CompactDecodeError Source # _JSONDecodeError :: Prism' Error String Source # _NoUsableKeys :: Prism' Error () Source # _JWSCritUnprotected :: Prism' Error () Source # _JWSNoValidSignatures :: Prism' Error () Source # _JWSInvalidSignature :: Prism' Error () Source # _JWSNoSignatures :: Prism' Error () Source # |
class AsError r where Source #
_Error :: Prism' r Error Source #
_AlgorithmNotImplemented :: Prism' r () Source #
_AlgorithmMismatch :: Prism' r String Source #
_KeyMismatch :: Prism' r Text Source #
_KeySizeTooSmall :: Prism' r () Source #
_OtherPrimesNotSupported :: Prism' r () Source #
_RSAError :: Prism' r Error Source #
_CryptoError :: Prism' r CryptoError Source #
_CompactDecodeError :: Prism' r CompactDecodeError Source #
_JSONDecodeError :: Prism' r String Source #
_NoUsableKeys :: Prism' r () Source #
_JWSCritUnprotected :: Prism' r () Source #
_JWSNoValidSignatures :: Prism' r () Source #
_JWSInvalidSignature :: Prism' r () Source #
_JWSNoSignatures :: Prism' r () Source #
Instances
JOSE compact serialisation errors
data InvalidNumberOfParts Source #
The wrong number of parts were found when decoding a compact JOSE object.
InvalidNumberOfParts Natural Natural | expected vs actual parts |
Instances
Eq InvalidNumberOfParts Source # | |
Defined in Crypto.JOSE.Error (==) :: InvalidNumberOfParts -> InvalidNumberOfParts -> Bool # (/=) :: InvalidNumberOfParts -> InvalidNumberOfParts -> Bool # | |
Show InvalidNumberOfParts Source # | |
Defined in Crypto.JOSE.Error showsPrec :: Int -> InvalidNumberOfParts -> ShowS # show :: InvalidNumberOfParts -> String # showList :: [InvalidNumberOfParts] -> ShowS # |
expectedParts :: Getter InvalidNumberOfParts Natural Source #
Get the expected or actual number of parts.
actualParts :: Getter InvalidNumberOfParts Natural Source #
Get the expected or actual number of parts.
data CompactTextError Source #
Bad UTF-8 data in a compact object, at the specified index
Instances
Eq CompactTextError Source # | |
Defined in Crypto.JOSE.Error (==) :: CompactTextError -> CompactTextError -> Bool # (/=) :: CompactTextError -> CompactTextError -> Bool # | |
Show CompactTextError Source # | |
Defined in Crypto.JOSE.Error showsPrec :: Int -> CompactTextError -> ShowS # show :: CompactTextError -> String # showList :: [CompactTextError] -> ShowS # |
data CompactDecodeError Source #
An error when decoding a JOSE compact object.
JSON decoding errors that occur during compact object processing
throw JSONDecodeError
.
Instances
Eq CompactDecodeError Source # | |
Defined in Crypto.JOSE.Error (==) :: CompactDecodeError -> CompactDecodeError -> Bool # (/=) :: CompactDecodeError -> CompactDecodeError -> Bool # | |
Show CompactDecodeError Source # | |
Defined in Crypto.JOSE.Error showsPrec :: Int -> CompactDecodeError -> ShowS # show :: CompactDecodeError -> String # showList :: [CompactDecodeError] -> ShowS # |
Orphan instances
(MonadRandom m, MonadTrans t, Functor (t m), Monad (t m)) => MonadRandom (t m) Source # | |
getRandomBytes :: ByteArray byteArray => Int -> t m byteArray # |