Transform a CryptoFailable to an Either
Modulecrypton-2.1.7Haskell2010
Crypto.Error
- 2 types
- 5 values
- Packagecrypton-2.1.7
- Exports7
- LanguageHaskell2010
- LicenceBSD-3-Clause AND MIT AND ISC
- SourceTypes.hs
Transform a CryptoFailable to a Maybe
Simple either like combinator for CryptoFailable type
Same as throwCryptoErrorIO but throw the error asynchronously.
Throw an CryptoError as exception on CryptoFailed result, otherwise return the computed value
Enumeration of all possible errors that can be found in this library
Constructors
CryptoError_KeySizeInvalidCryptoError_IvSizeInvalidCryptoError_SeedSizeInvalidCryptoError_AEADModeNotSupportedCryptoError_SecretKeySizeInvalidCryptoError_SecretKeyStructureInvalidCryptoError_PublicKeySizeInvalidCryptoError_EcScalarOutOfBoundsCryptoError_PointSizeInvalidCryptoError_PointFormatInvalidCryptoError_PointFormatUnsupportedCryptoError_PointCoordinatesInvalidCryptoError_ScalarMultiplicationInvalidCryptoError_MacKeyInvalidCryptoError_AuthenticationTagSizeInvalidCryptoError_PrimeSizeInvalidCryptoError_SaltTooSmallCryptoError_OutputLengthTooSmallCryptoError_OutputLengthTooBigCryptoError_ParameterInvalidA parameter is outside the range the algorithm accepts. Appended to keep the Enum values of the constructors above unchanged.
CryptoError_PointSubgroupInvalidA point satisfies the curve equation but lies outside the subgroup the base point generates, so multiplying it would answer modulo a small order. Appended for the same reason as the constructor above.
Instances5Enum, Eq, Data, Show, Exception
Enum CryptoErrorDefined in crypton-2.1.7 · Crypto.Error.TypesEq CryptoErrorDefined in crypton-2.1.7 · Crypto.Error.TypesData CryptoErrorDefined in crypton-2.1.7 · Crypto.Error.TypesShow CryptoErrorDefined in crypton-2.1.7 · Crypto.Error.TypesException CryptoErrorDefined in crypton-2.1.7 · Crypto.Error.Types
A simple Either like type to represent a computation that can fail
2 possibles values are:
CryptoPassed : The computation succeeded, and contains the result of the computation
CryptoFailed : The computation failed, and contains the cryptographic error associated
Constructors
Instances5Monad, Functor, Applicative, Eq, Show
Monad CryptoFailableDefined in crypton-2.1.7 · Crypto.Error.TypesFunctor CryptoFailableDefined in crypton-2.1.7 · Crypto.Error.TypesApplicative CryptoFailableDefined in crypton-2.1.7 · Crypto.Error.TypesEq a => Eq (CryptoFailable a)Defined in crypton-2.1.7 · Crypto.Error.TypesShow a => Show (CryptoFailable a)Defined in crypton-2.1.7 · Crypto.Error.Types