| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Codec.Encryption.OpenPGP.S2K
Synopsis
- data EncodedSessionKeyError
- renderEncodedSessionKeyError :: EncodedSessionKeyError -> String
- data S2KError
- = S2KUnsupportedAlgorithm CipherError
- | S2KUnsupportedSpecifier Word8
- | S2KUnsupportedSKESKShape String
- | S2KUnsupportedHashAlgorithm HashAlgorithm
- | S2KArgon2ParamError String
- | S2KArgon2Failed String
- | S2KEncryptedSessionKeyCipherError CipherError
- | S2KEncryptedSessionKeyDecodeError EncodedSessionKeyError
- renderS2KError :: S2KError -> String
- decodeOpenPGPEncodedSessionKey :: ByteString -> Either EncodedSessionKeyError (SymmetricAlgorithm, ByteString)
- string2Key :: S2K -> Int -> ByteString -> Either S2KError ByteString
- skesk2Key :: SKESK 'SKESKV4 -> ByteString -> Either S2KError ByteString
- skesk2SessionKey :: SKESK 'SKESKV4 -> ByteString -> Either S2KError (SymmetricAlgorithm, ByteString)
Documentation
data EncodedSessionKeyError Source #
Constructors
| EncodedSessionKeyTooShort | |
| EncodedSessionKeyUnsupportedAlgorithm SymmetricAlgorithm | |
| EncodedSessionKeyLengthMismatch SymmetricAlgorithm Int Int | |
| EncodedSessionKeyChecksumMismatch |
Instances
| Show EncodedSessionKeyError Source # | |
Defined in Codec.Encryption.OpenPGP.S2K | |
| Eq EncodedSessionKeyError Source # | |
Defined in Codec.Encryption.OpenPGP.S2K Methods (==) :: EncodedSessionKeyError -> EncodedSessionKeyError -> Bool Source # (/=) :: EncodedSessionKeyError -> EncodedSessionKeyError -> Bool Source # | |
Errors that can arise during string-to-key derivation.
Constructors
| S2KUnsupportedAlgorithm CipherError | The symmetric algorithm used in the SKESK is not supported. |
| S2KUnsupportedSpecifier Word8 | An unsupported or unknown S2K specifier type was encountered. |
| S2KUnsupportedSKESKShape String | An unsupported SKESK shape (e.g. non-zero ESK). |
| S2KUnsupportedHashAlgorithm HashAlgorithm | A required hash algorithm is not supported for S2K. |
| S2KArgon2ParamError String | The Argon2 S2K parameters are invalid. |
| S2KArgon2Failed String | The Argon2 KDF itself failed. |
| S2KEncryptedSessionKeyCipherError CipherError | Decrypting an embedded encrypted session key failed. |
| S2KEncryptedSessionKeyDecodeError EncodedSessionKeyError | Embedded encrypted session key material was malformed. |
renderS2KError :: S2KError -> String Source #
decodeOpenPGPEncodedSessionKey :: ByteString -> Either EncodedSessionKeyError (SymmetricAlgorithm, ByteString) Source #
string2Key :: S2K -> Int -> ByteString -> Either S2KError ByteString Source #
skesk2Key :: SKESK 'SKESKV4 -> ByteString -> Either S2KError ByteString Source #
skesk2SessionKey :: SKESK 'SKESKV4 -> ByteString -> Either S2KError (SymmetricAlgorithm, ByteString) Source #