cryptostore-0.3.1.0: Serialization of cryptographic data types

License | BSD-style
Maintainer | Olivier Chéron <olivier.cheron@gmail.com>
Stability | experimental
Portability | unknown
Safe Haskell | Safe-Inferred
Language | Haskell2010

Crypto.Store.Error

Description

Error data type.

Synopsis

- data StoreError
  - = CryptoError CryptoError
  - | RSAError Error
  - | DecodingError ASN1Error
  - | ParseFailure String
  - | DecryptionFailed
  - | BadContentMAC
  - | BadChecksum
  - | DigestMismatch
  - | SignatureNotVerified
  - | InvalidInput String
  - | InvalidPassword String
  - | InvalidParameter String
  - | UnexpectedPublicKeyType
  - | UnexpectedPrivateKeyType
  - | RecipientTypeMismatch
  - | RecipientKeyNotFound
  - | NoRecipientInfoFound
  - | NoRecipientInfoMatched
  - | UnsupportedOriginatorFormat
  - | UnsupportedEllipticCurve
  - | NamedCurveRequired
- fromCryptoFailable :: CryptoFailable a -> Either StoreError a

# Documentation

data StoreError Source #

Error type in cryptostore.

Constructors

CryptoError CryptoError | Wraps a cryptonite error
RSAError Error | Wraps an RSA crypto error
DecodingError ASN1Error | Error while decoding ASN.1 content
ParseFailure String | Error while parsing an ASN.1 object
DecryptionFailed | Unable to decrypt, incorrect key or password?
BadContentMAC | MAC verification failed, incorrect key or password?
BadChecksum | Checksum verification failed, incorrect key or password?
DigestMismatch | Digest verification failed
SignatureNotVerified | Signature verification failed
InvalidInput String | Some condition is not met about input to algorithm
InvalidPassword String | Some condition is not met about input password
InvalidParameter String | Some condition is not met about algorithm parameters
UnexpectedPublicKeyType | The algorithm expects another public key type
UnexpectedPrivateKeyType | The algorithm expects another private key type
RecipientTypeMismatch | Returned when the type of recipient info does not match the consumer function
RecipientKeyNotFound | The certificate provided does not match any encrypted key found
NoRecipientInfoFound | No recipient info is available in the enveloped data
NoRecipientInfoMatched | No recipient info could be used with the consumer function
UnsupportedOriginatorFormat | Only anonymous public key is supported
UnsupportedEllipticCurve | The elliptic curve used is not supported
NamedCurveRequired | The algorithm requires a named elliptic curve

#### Instances

Instances details

Show StoreError Source # |
Instance details Defined in Crypto.Store.Error Methods showsPrec :: Int -> StoreError -> ShowS Source # show :: StoreError -> String Source # showList :: [StoreError] -> ShowS Source #
Eq StoreError Source # |
Instance details Defined in Crypto.Store.Error Methods (==) :: StoreError -> StoreError -> Bool Source # (/=) :: StoreError -> StoreError -> Bool Source #

fromCryptoFailable :: CryptoFailable a -> Either StoreError a Source #

Turn a `CryptoFailed` into a `StoreError`.