hOpenPGP-2.4.3: native Haskell implementation of OpenPGP (RFC4880)

Safe Haskell | None
Language | Haskell2010

Codec.Encryption.OpenPGP.Types

# Documentation

type Exportability = Bool Source

type TrustLevel = Word8 Source

type TrustAmount = Word8 Source

type AlmostPublicDomainRegex = ByteString Source

type Revocability = Bool Source

type RevocationReason = Text Source

type KeyServer = ByteString Source

type SignatureHash = ByteString Source

type PacketVersion = Word8 Source

type V3Expiration = Word16 Source

type CompressedDataPayload = ByteString Source

type FileName = ByteString Source

type ImageData = ByteString Source

type NestedFlag = Bool Source

data SymmetricAlgorithm Source

Constructors

Plaintext |
IDEA |
TripleDES |
CAST5 |
Blowfish |
ReservedSAFER |
ReservedDES |
AES128 |
AES192 |
AES256 |
Twofish |
Camellia128 |
Camellia192 |
Camellia256 |
OtherSA Word8 |

Instances

Eq SymmetricAlgorithm Source |
Data SymmetricAlgorithm Source |
Ord SymmetricAlgorithm Source |
Show SymmetricAlgorithm Source |
Generic SymmetricAlgorithm Source |
ToJSON SymmetricAlgorithm Source |
FromJSON SymmetricAlgorithm Source |
Hashable SymmetricAlgorithm Source |
Pretty SymmetricAlgorithm Source |
FutureVal SymmetricAlgorithm Source |
type Rep SymmetricAlgorithm Source |

data NotationFlag Source

Constructors

HumanReadable |
OtherNF Word8 |

Instances

Eq NotationFlag Source |
Data NotationFlag Source |
Ord NotationFlag Source |
Show NotationFlag Source |
Generic NotationFlag Source |
ToJSON NotationFlag Source |
FromJSON NotationFlag Source |
Hashable NotationFlag Source |
Pretty NotationFlag Source |
FutureFlag NotationFlag Source |
type Rep NotationFlag Source |

data SigSubPacket Source

Constructors

SigSubPacket |

Fields

_sspCriticality :: Bool
_sspPayload :: SigSubPacketPayload

Instances

Eq SigSubPacket Source |
Data SigSubPacket Source |
Show SigSubPacket Source |
Generic SigSubPacket Source |
ToJSON SigSubPacket Source |
FromJSON SigSubPacket Source |
Hashable SigSubPacket Source |
Pretty SigSubPacket Source |
type Rep SigSubPacket Source |

newtype ThirtyTwoBitTimeStamp Source

Constructors

ThirtyTwoBitTimeStamp |

Fields

unThirtyTwoBitTimeStamp :: Word32

Instances

Bounded ThirtyTwoBitTimeStamp Source |
Enum ThirtyTwoBitTimeStamp Source |
Eq ThirtyTwoBitTimeStamp Source |
Integral ThirtyTwoBitTimeStamp Source |
Data ThirtyTwoBitTimeStamp Source |
Num ThirtyTwoBitTimeStamp Source |
Ord ThirtyTwoBitTimeStamp Source |
Real ThirtyTwoBitTimeStamp Source |
Show ThirtyTwoBitTimeStamp Source |
Generic ThirtyTwoBitTimeStamp Source |
ToJSON ThirtyTwoBitTimeStamp Source |
FromJSON ThirtyTwoBitTimeStamp Source |
Hashable ThirtyTwoBitTimeStamp Source |
Pretty ThirtyTwoBitTimeStamp Source |
Newtype ThirtyTwoBitTimeStamp Word32 Source |
type Rep ThirtyTwoBitTimeStamp Source |

newtype ThirtyTwoBitDuration Source

Constructors

ThirtyTwoBitDuration |

Fields

unThirtyTwoBitDuration :: Word32

Instances

Bounded ThirtyTwoBitDuration Source |
Enum ThirtyTwoBitDuration Source |
Eq ThirtyTwoBitDuration Source |
Integral ThirtyTwoBitDuration Source |
Data ThirtyTwoBitDuration Source |
Num ThirtyTwoBitDuration Source |
Ord ThirtyTwoBitDuration Source |
Real ThirtyTwoBitDuration Source |
Show ThirtyTwoBitDuration Source |
Generic ThirtyTwoBitDuration Source |
ToJSON ThirtyTwoBitDuration Source |
FromJSON ThirtyTwoBitDuration Source |
Hashable ThirtyTwoBitDuration Source |
Pretty ThirtyTwoBitDuration Source |
Newtype ThirtyTwoBitDuration Word32 Source |
type Rep ThirtyTwoBitDuration Source |

durU :: (Integral a, Show a) => a -> Maybe (String, a) Source

newtype URL Source

Constructors

URL |

Fields

unURL :: URI

Instances

Eq URL Source |
Data URL Source |
Ord URL Source |
Show URL Source |
Generic URL Source |
ToJSON URL Source |
FromJSON URL Source |
Hashable URL Source |
Pretty URL Source |
Newtype URL URI Source |
type Rep URL Source |

newtype NotationName Source

Constructors

NotationName |

Fields

unNotationName :: ByteString

Instances

Eq NotationName Source |
Data NotationName Source |
Ord NotationName Source |
Show NotationName Source |
Generic NotationName Source |
ToJSON NotationName Source |
FromJSON NotationName Source |
Hashable NotationName Source |
Pretty NotationName Source |
Newtype NotationName ByteString Source |
type Rep NotationName Source |

newtype NotationValue Source

Constructors

NotationValue |

Fields

unNotationValue :: ByteString

Instances

Eq NotationValue Source |
Data NotationValue Source |
Ord NotationValue Source |
Show NotationValue Source |
Generic NotationValue Source |
ToJSON NotationValue Source |
FromJSON NotationValue Source |
Hashable NotationValue Source |
Pretty NotationValue Source |
Newtype NotationValue ByteString Source |
type Rep NotationValue Source |

data SigSubPacketPayload Source

Constructors

SigCreationTime ThirtyTwoBitTimeStamp |
SigExpirationTime ThirtyTwoBitDuration |
ExportableCertification Exportability |
TrustSignature TrustLevel TrustAmount |
RegularExpression AlmostPublicDomainRegex |
Revocable Revocability |
KeyExpirationTime ThirtyTwoBitDuration |
PreferredSymmetricAlgorithms [SymmetricAlgorithm] |
RevocationKey (Set RevocationClass) PubKeyAlgorithm TwentyOctetFingerprint |
Issuer EightOctetKeyId |
NotationData (Set NotationFlag) NotationName NotationValue |
PreferredHashAlgorithms [HashAlgorithm] |
PreferredCompressionAlgorithms [CompressionAlgorithm] |
KeyServerPreferences (Set KSPFlag) |
PreferredKeyServer KeyServer |
PrimaryUserId Bool |
PolicyURL URL |
KeyFlags (Set KeyFlag) |
SignersUserId Text |
ReasonForRevocation RevocationCode RevocationReason |
Features (Set FeatureFlag) |
SignatureTarget PubKeyAlgorithm HashAlgorithm SignatureHash |
EmbeddedSignature SignaturePayload |
UserDefinedSigSub Word8 ByteString |
OtherSigSub Word8 ByteString |

Instances

Eq SigSubPacketPayload Source |
Data SigSubPacketPayload Source |
Show SigSubPacketPayload Source |
Generic SigSubPacketPayload Source |
ToJSON SigSubPacketPayload Source |
FromJSON SigSubPacketPayload Source |
Hashable SigSubPacketPayload Source |
Pretty SigSubPacketPayload Source |
type Rep SigSubPacketPayload Source |

uc3 :: (a -> b -> c -> d) -> (a, b, c) -> d Source

data HashAlgorithm Source

Constructors

DeprecatedMD5 |
SHA1 |
RIPEMD160 |
SHA256 |
SHA384 |
SHA512 |
SHA224 |
OtherHA Word8 |

Instances

Eq HashAlgorithm Source |
Data HashAlgorithm Source |
Ord HashAlgorithm Source |
Show HashAlgorithm Source |
Generic HashAlgorithm Source |
ToJSON HashAlgorithm Source |
FromJSON HashAlgorithm Source |
Hashable HashAlgorithm Source |
Pretty HashAlgorithm Source |
FutureVal HashAlgorithm Source |
type Rep HashAlgorithm Source |

data CompressionAlgorithm Source

Constructors

Uncompressed |
ZIP |
ZLIB |
BZip2 |
OtherCA Word8 |

Instances

Eq CompressionAlgorithm Source |
Data CompressionAlgorithm Source |
Ord CompressionAlgorithm Source |
Show CompressionAlgorithm Source |
Generic CompressionAlgorithm Source |
ToJSON CompressionAlgorithm Source |
FromJSON CompressionAlgorithm Source |
Hashable CompressionAlgorithm Source |
Pretty CompressionAlgorithm Source |
FutureVal CompressionAlgorithm Source |
type Rep CompressionAlgorithm Source |

class (Eq a, Ord a) => FutureVal a where Source

Methods

fromFVal :: a -> Word8 Source

toFVal :: Word8 -> a Source

Instances

FutureVal SigType Source |
FutureVal ImageFormat Source |
FutureVal DataType Source |
FutureVal RevocationCode Source |
FutureVal PubKeyAlgorithm Source |
FutureVal CompressionAlgorithm Source |
FutureVal HashAlgorithm Source |
FutureVal SymmetricAlgorithm Source |

data PubKeyAlgorithm Source

Constructors

RSA |
DeprecatedRSAEncryptOnly |
DeprecatedRSASignOnly |
ElgamalEncryptOnly |
DSA |
ECDH |
ECDSA |
ForbiddenElgamal |
DH |
OtherPKA Word8 |

Instances

Eq PubKeyAlgorithm Source |
Data PubKeyAlgorithm Source |
Ord PubKeyAlgorithm Source |
Show PubKeyAlgorithm Source |
Generic PubKeyAlgorithm Source |
ToJSON PubKeyAlgorithm Source |
FromJSON PubKeyAlgorithm Source |
Hashable PubKeyAlgorithm Source |
Pretty PubKeyAlgorithm Source |
FutureVal PubKeyAlgorithm Source |
type Rep PubKeyAlgorithm Source |

class (Eq a, Ord a) => FutureFlag a where Source

Methods

fromFFlag :: a -> Int Source

toFFlag :: Int -> a Source

Instances

FutureFlag FeatureFlag Source |
FutureFlag RevocationClass Source |
FutureFlag KeyFlag Source |
FutureFlag KSPFlag Source |
FutureFlag NotationFlag Source |

data KSPFlag Source

Constructors

NoModify |
KSPOther Int |

Instances

Eq KSPFlag Source |
Data KSPFlag Source |
Ord KSPFlag Source |
Show KSPFlag Source |
Generic KSPFlag Source |
ToJSON KSPFlag Source |
FromJSON KSPFlag Source |
Hashable KSPFlag Source |
Pretty KSPFlag Source |
FutureFlag KSPFlag Source |
type Rep KSPFlag Source |

data KeyFlag Source

Constructors

GroupKey |
AuthKey |
SplitKey |
EncryptStorageKey |
EncryptCommunicationsKey |
SignDataKey |
CertifyKeysKey |
KFOther Int |

Instances

Eq KeyFlag Source |
Data KeyFlag Source |
Ord KeyFlag Source |
Show KeyFlag Source |
Generic KeyFlag Source |
ToJSON KeyFlag Source |
FromJSON KeyFlag Source |
Hashable KeyFlag Source |
Pretty KeyFlag Source |
FutureFlag KeyFlag Source |
type Rep KeyFlag Source |

data RevocationClass Source

Constructors

SensitiveRK |
RClOther Word8 |

Instances

Eq RevocationClass Source |
Data RevocationClass Source |
Ord RevocationClass Source |
Show RevocationClass Source |
Generic RevocationClass Source |
ToJSON RevocationClass Source |
FromJSON RevocationClass Source |
Hashable RevocationClass Source |
Pretty RevocationClass Source |
FutureFlag RevocationClass Source |
type Rep RevocationClass Source |

data RevocationCode Source

Constructors

NoReason |
KeySuperseded |
KeyMaterialCompromised |
KeyRetiredAndNoLongerUsed |
UserIdInfoNoLongerValid |
RCoOther Word8 |

Instances

Eq RevocationCode Source |
Data RevocationCode Source |
Ord RevocationCode Source |
Show RevocationCode Source |
Generic RevocationCode Source |
ToJSON RevocationCode Source |
FromJSON RevocationCode Source |
Hashable RevocationCode Source |
Pretty RevocationCode Source |
FutureVal RevocationCode Source |
type Rep RevocationCode Source |

data FeatureFlag Source

Constructors

ModificationDetection |
FeatureOther Int |

Instances

Eq FeatureFlag Source |
Data FeatureFlag Source |
Ord FeatureFlag Source |
Show FeatureFlag Source |
Generic FeatureFlag Source |
ToJSON FeatureFlag Source |
FromJSON FeatureFlag Source |
Hashable FeatureFlag Source |
Pretty FeatureFlag Source |
FutureFlag FeatureFlag Source |
type Rep FeatureFlag Source |

newtype MPI Source

Constructors

MPI |

Fields

unMPI :: Integer

Instances

Eq MPI Source |
Data MPI Source |
Show MPI Source |
Generic MPI Source |
ToJSON MPI Source |
FromJSON MPI Source |
Hashable MPI Source |
Pretty MPI Source |
Newtype MPI Integer Source |
type Rep MPI Source |

data SignaturePayload Source

Constructors

SigV3 SigType ThirtyTwoBitTimeStamp EightOctetKeyId PubKeyAlgorithm HashAlgorithm Word16 (NonEmpty MPI) |
SigV4 SigType PubKeyAlgorithm HashAlgorithm [SigSubPacket] [SigSubPacket] Word16 (NonEmpty MPI) |
SigVOther Word8 ByteString |

Instances

Eq SignaturePayload Source |
Data SignaturePayload Source |
Show SignaturePayload Source |
Generic SignaturePayload Source |
ToJSON SignaturePayload Source |
Hashable SignaturePayload Source |
Pretty SignaturePayload Source |
type Rep SignaturePayload Source |

data KeyVersion Source

Constructors

DeprecatedV3 |
V4 |

Instances

Eq KeyVersion Source |
Data KeyVersion Source |
Ord KeyVersion Source |
Show KeyVersion Source |
Generic KeyVersion Source |
ToJSON KeyVersion Source |
FromJSON KeyVersion Source |
Hashable KeyVersion Source |
Pretty KeyVersion Source |
type Rep KeyVersion Source |

newtype IV Source

Constructors

IV |

Fields

unIV :: ByteString

Instances

Eq IV Source |
Data IV Source |
Show IV Source |
Generic IV Source |
ToJSON IV Source |
Monoid IV Source |
Byteable IV Source |
ByteArrayAccess IV Source |
Hashable IV Source |
Pretty IV Source |
Newtype IV ByteString Source |
type Rep IV Source |

data DataType Source

Constructors

BinaryData |
TextData |
UTF8Data |
OtherData Word8 |

Instances

Eq DataType Source |
Data DataType Source |
Ord DataType Source |
Show DataType Source |
Generic DataType Source |
ToJSON DataType Source |
FromJSON DataType Source |
Hashable DataType Source |
Pretty DataType Source |
FutureVal DataType Source |
type Rep DataType Source |

newtype Salt Source

Constructors

Salt |

Fields

unSalt :: ByteString

Instances

Eq Salt Source |
Data Salt Source |
Show Salt Source |
Generic Salt Source |
ToJSON Salt Source |
Byteable Salt Source |
Hashable Salt Source |
Pretty Salt Source |
Newtype Salt ByteString Source |
type Rep Salt Source |

newtype IterationCount Source

Constructors

IterationCount |

Fields

unIterationCount :: Int

Instances

Bounded IterationCount Source |
Enum IterationCount Source |
Eq IterationCount Source |
Integral IterationCount Source |
Data IterationCount Source |
Num IterationCount Source |
Ord IterationCount Source |
Real IterationCount Source |
Show IterationCount Source |
Generic IterationCount Source |
ToJSON IterationCount Source |
FromJSON IterationCount Source |
Hashable IterationCount Source |
Pretty IterationCount Source |
Newtype IterationCount Int Source |
type Rep IterationCount Source |

data S2K Source

Constructors

Simple HashAlgorithm |
Salted HashAlgorithm Salt |
IteratedSalted HashAlgorithm Salt IterationCount |
OtherS2K Word8 ByteString |

Instances

Eq S2K Source |
Data S2K Source |
Show S2K Source |
Generic S2K Source |
ToJSON S2K Source |
Hashable S2K Source |
Pretty S2K Source |
type Rep S2K Source |

data UserAttrSubPacket Source

Constructors

ImageAttribute ImageHeader ImageData |
OtherUASub Word8 ByteString |

Instances

Eq UserAttrSubPacket Source |
Data UserAttrSubPacket Source |
Ord UserAttrSubPacket Source |
Show UserAttrSubPacket Source |
Generic UserAttrSubPacket Source |
ToJSON UserAttrSubPacket Source |
Hashable UserAttrSubPacket Source |
Pretty UserAttrSubPacket Source |
type Rep UserAttrSubPacket Source |

data ImageHeader Source

Constructors

ImageHV1 ImageFormat |

Instances

Eq ImageHeader Source |
Data ImageHeader Source |
Ord ImageHeader Source |
Show ImageHeader Source |
Generic ImageHeader Source |
ToJSON ImageHeader Source |
FromJSON ImageHeader Source |
Hashable ImageHeader Source |
Pretty ImageHeader Source |
type Rep ImageHeader Source |

data ImageFormat Source

Constructors

JPEG |
OtherImage Word8 |

Instances

Eq ImageFormat Source |
Data ImageFormat Source |
Ord ImageFormat Source |
Show ImageFormat Source |
Generic ImageFormat Source |
ToJSON ImageFormat Source |
FromJSON ImageFormat Source |
Hashable ImageFormat Source |
Pretty ImageFormat Source |
FutureVal ImageFormat Source |
type Rep ImageFormat Source |

data SigType Source

Constructors

BinarySig |
CanonicalTextSig |
StandaloneSig |
GenericCert |
PersonaCert |
CasualCert |
PositiveCert |
SubkeyBindingSig |
PrimaryKeyBindingSig |
SignatureDirectlyOnAKey |
KeyRevocationSig |
SubkeyRevocationSig |
CertRevocationSig |
TimestampSig |
ThirdPartyConfirmationSig |
OtherSig Word8 |

Instances

Eq SigType Source |
Data SigType Source |
Ord SigType Source |
Show SigType Source |
Generic SigType Source |
ToJSON SigType Source |
FromJSON SigType Source |
Hashable SigType Source |
Pretty SigType Source |
FutureVal SigType Source |
type Rep SigType Source |

data ECCCurve Source

Constructors

BrokenNISTP256 |
BrokenNISTP384 |
BrokenNISTP521 |

Instances

Eq ECCCurve Source |
Data ECCCurve Source |
Ord ECCCurve Source |
Show ECCCurve Source |
Generic ECCCurve Source |
Hashable ECCCurve Source |
type Rep ECCCurve Source |

newtype Block a Source

Constructors

Block |

Fields

unBlock :: [a]

Instances

Eq a => Eq (Block a) Source |
Show a => Show (Block a) Source |

newtype EightOctetKeyId Source

Constructors

EightOctetKeyId |

Fields

unEOKI :: ByteString

Instances

Eq EightOctetKeyId Source |
Data EightOctetKeyId Source |
Ord EightOctetKeyId Source |
Read EightOctetKeyId Source |
Show EightOctetKeyId Source |
Generic EightOctetKeyId Source |
ToJSON EightOctetKeyId Source |
FromJSON EightOctetKeyId Source |
Hashable EightOctetKeyId Source |
Pretty EightOctetKeyId Source |
Newtype EightOctetKeyId ByteString Source |
type Rep EightOctetKeyId Source |

newtype TwentyOctetFingerprint Source

Constructors

TwentyOctetFingerprint |

Fields

unTOF :: ByteString

Instances

Eq TwentyOctetFingerprint Source |
Data TwentyOctetFingerprint Source |
Ord TwentyOctetFingerprint Source |
Read TwentyOctetFingerprint Source |
Show TwentyOctetFingerprint Source |
Generic TwentyOctetFingerprint Source |
ToJSON TwentyOctetFingerprint Source |
FromJSON TwentyOctetFingerprint Source |
Hashable TwentyOctetFingerprint Source |
Pretty TwentyOctetFingerprint Source |
Newtype SpacedFingerprint TwentyOctetFingerprint Source |
Newtype TwentyOctetFingerprint ByteString Source |
type Rep TwentyOctetFingerprint Source |

newtype SpacedFingerprint Source

Constructors

SpacedFingerprint |

Fields

unSpacedFingerprint :: TwentyOctetFingerprint

Instances

Pretty SpacedFingerprint Source |
Newtype SpacedFingerprint TwentyOctetFingerprint Source |

w8sToHex :: [Word8] -> String Source

hexToW8s :: ReadS Word8 Source

sspPayload :: Lens' SigSubPacket SigSubPacketPayload Source

sspCriticality :: Lens' SigSubPacket Bool Source

newtype DSA_PublicKey Source

Constructors

DSA_PublicKey |

Fields

unDSA_PublicKey :: PublicKey

Instances

Eq DSA_PublicKey Source |
Data DSA_PublicKey Source |
Ord DSA_PublicKey Source |
Show DSA_PublicKey Source |
Generic DSA_PublicKey Source |
ToJSON DSA_PublicKey Source |
Hashable DSA_PublicKey Source |
Pretty DSA_PublicKey Source |
type Rep DSA_PublicKey Source |

newtype RSA_PublicKey Source

Constructors

RSA_PublicKey |

Fields

unRSA_PublicKey :: PublicKey

Instances

Eq RSA_PublicKey Source |
Data RSA_PublicKey Source |
Ord RSA_PublicKey Source |
Show RSA_PublicKey Source |
Generic RSA_PublicKey Source |
ToJSON RSA_PublicKey Source |
Hashable RSA_PublicKey Source |
Pretty RSA_PublicKey Source |
type Rep RSA_PublicKey Source |

newtype ECDSA_PublicKey Source

Constructors

ECDSA_PublicKey |

Fields

unECDSA_PublicKey :: PublicKey

Instances

Eq ECDSA_PublicKey Source |
Data ECDSA_PublicKey Source |
Ord ECDSA_PublicKey Source |
Show ECDSA_PublicKey Source |
Generic ECDSA_PublicKey Source |
ToJSON ECDSA_PublicKey Source |
Hashable ECDSA_PublicKey Source |
Pretty ECDSA_PublicKey Source |
type Rep ECDSA_PublicKey Source |

newtype DSA_PrivateKey Source

Constructors

DSA_PrivateKey |

Fields

unDSA_PrivateKey :: PrivateKey

Instances

Eq DSA_PrivateKey Source |
Data DSA_PrivateKey Source |
Ord DSA_PrivateKey Source |
Show DSA_PrivateKey Source |
Generic DSA_PrivateKey Source |
ToJSON DSA_PrivateKey Source |
Hashable DSA_PrivateKey Source |
Pretty DSA_PrivateKey Source |
type Rep DSA_PrivateKey Source |

newtype RSA_PrivateKey Source

Constructors

RSA_PrivateKey |

Fields

unRSA_PrivateKey :: PrivateKey

Instances

Eq RSA_PrivateKey Source |
Data RSA_PrivateKey Source |
Ord RSA_PrivateKey Source |
Show RSA_PrivateKey Source |
Generic RSA_PrivateKey Source |
ToJSON RSA_PrivateKey Source |
Hashable RSA_PrivateKey Source |
Pretty RSA_PrivateKey Source |
type Rep RSA_PrivateKey Source |

newtype ECDSA_PrivateKey Source

Constructors

ECDSA_PrivateKey |

Fields

unECDSA_PrivateKey :: PrivateKey

Instances

Eq ECDSA_PrivateKey Source |
Data ECDSA_PrivateKey Source |
Ord ECDSA_PrivateKey Source |
Show ECDSA_PrivateKey Source |
Generic ECDSA_PrivateKey Source |
ToJSON ECDSA_PrivateKey Source |
Hashable ECDSA_PrivateKey Source |
Pretty ECDSA_PrivateKey Source |
type Rep ECDSA_PrivateKey Source |

newtype DSA_Params Source

Constructors

DSA_Params |

Fields

unDSA_Params :: Params

Instances

Eq DSA_Params Source |
Data DSA_Params Source |
Show DSA_Params Source |
Generic DSA_Params Source |
ToJSON DSA_Params Source |
Hashable DSA_Params Source |
Pretty DSA_Params Source |
type Rep DSA_Params Source |

class Packet a where Source

Associated Types

data PacketType a :: * Source

Methods

packetType :: a -> PacketType a Source

packetCode :: PacketType a -> Word8 Source

toPkt :: a -> Pkt Source

fromPkt :: Pkt -> a Source

Instances

Packet BrokenPacket Source |
Packet OtherPacket Source |
Packet ModificationDetectionCode Source |
Packet SymEncIntegrityProtectedData Source |
Packet UserAttribute Source |
Packet PublicSubkey Source |
Packet UserId Source |
Packet Trust Source |
Packet LiteralData Source |
Packet Marker Source |
Packet SymEncData Source |
Packet CompressedData Source |
Packet SecretSubkey Source |
Packet PublicKey Source |
Packet SecretKey Source |
Packet OnePassSignature Source |
Packet SKESK Source |
Packet Signature Source |
Packet PKESK Source |

data PKESK Source

Constructors

PKESK |

Fields

_pkeskPacketVersion :: PacketVersion
_pkeskEightOctetKeyId :: EightOctetKeyId
_pkeskPubKeyAlgorithm :: PubKeyAlgorithm
_pkeskMPIs :: NonEmpty MPI

Instances

Eq PKESK Source |
Data PKESK Source |
Show PKESK Source |
Pretty PKESK Source |
Packet PKESK Source |
Eq (PacketType PKESK) Source |
Show (PacketType PKESK) Source |
data PacketType PKESK = PKESKType Source |

data Signature Source

Constructors

Signature |

Fields

_signaturePayload :: SignaturePayload

Instances

Eq Signature Source |
Data Signature Source |
Show Signature Source |
Pretty Signature Source |
Packet Signature Source |
Eq (PacketType Signature) Source |
Show (PacketType Signature) Source |
data PacketType Signature = SignatureType Source |

data SKESK Source

Constructors

SKESK |

Fields

_skeskPacketVersion :: PacketVersion
_skeskSymmetricAlgorithm :: SymmetricAlgorithm
_skeskS2K :: S2K
_skeskESK :: Maybe ByteString

Instances

Eq SKESK Source |
Data SKESK Source |
Show SKESK Source |
Pretty SKESK Source |
Packet SKESK Source |
Eq (PacketType SKESK) Source |
Show (PacketType SKESK) Source |
data PacketType SKESK = SKESKType Source |

data OnePassSignature Source

Constructors

OnePassSignature |

Fields

_onePassSignaturePacketVersion :: PacketVersion
_onePassSignatureSigType :: SigType
_onePassSignatureHashAlgorithm :: HashAlgorithm
_onePassSignaturePubKeyAlgorithm :: PubKeyAlgorithm
_onePassSignatureEightOctetKeyId :: EightOctetKeyId
_onePassSignatureNestedFlag :: NestedFlag

Instances

Eq OnePassSignature Source |
Data OnePassSignature Source |
Show OnePassSignature Source |
Pretty OnePassSignature Source |
Packet OnePassSignature Source |
Eq (PacketType OnePassSignature) Source |
Show (PacketType OnePassSignature) Source |
data PacketType OnePassSignature = OnePassSignatureType Source |

data SecretKey Source

Constructors

SecretKey |

Fields

_secretKeyPKPayload :: PKPayload
_secretKeySKAddendum :: SKAddendum

Instances

Eq SecretKey Source |
Data SecretKey Source |
Show SecretKey Source |
Pretty SecretKey Source |
Packet SecretKey Source |
Eq (PacketType SecretKey) Source |
Show (PacketType SecretKey) Source |
data PacketType SecretKey = SecretKeyType Source |

data PublicKey Source

Constructors

PublicKey |

Fields

_publicKeyPKPayload :: PKPayload

Instances

Eq PublicKey Source |
Data PublicKey Source |
Show PublicKey Source |
Pretty PublicKey Source |
Packet PublicKey Source |
Eq (PacketType PublicKey) Source |
Show (PacketType PublicKey) Source |
data PacketType PublicKey = PublicKeyType Source |

data SecretSubkey Source

Constructors

SecretSubkey |

Fields

_secretSubkeyPKPayload :: PKPayload
_secretSubkeySKAddendum :: SKAddendum

Instances

Eq SecretSubkey Source |
Data SecretSubkey Source |
Show SecretSubkey Source |
Pretty SecretSubkey Source |
Packet SecretSubkey Source |
Eq (PacketType SecretSubkey) Source |
Show (PacketType SecretSubkey) Source |
data PacketType SecretSubkey = SecretSubkeyType Source |

data CompressedData Source

Constructors

CompressedData |

Fields

_compressedDataCompressionAlgorithm :: CompressionAlgorithm
_compressedDataPayload :: CompressedDataPayload

Instances

Eq CompressedData Source |
Data CompressedData Source |
Show CompressedData Source |
Pretty CompressedData Source |
Packet CompressedData Source |
Eq (PacketType CompressedData) Source |
Show (PacketType CompressedData) Source |
data PacketType CompressedData = CompressedDataType Source |

data SymEncData Source

Constructors

SymEncData |

Fields

_symEncDataPayload :: ByteString

Instances

Eq SymEncData Source |
Data SymEncData Source |
Show SymEncData Source |
Pretty SymEncData Source |
Packet SymEncData Source |
Eq (PacketType SymEncData) Source |
Show (PacketType SymEncData) Source |
data PacketType SymEncData = SymEncDataType Source |

data Marker Source

Constructors

Marker |

Fields

_markerPayload :: ByteString

Instances

Eq Marker Source |
Data Marker Source |
Show Marker Source |
Pretty Marker Source |
Packet Marker Source |
Eq (PacketType Marker) Source |
Show (PacketType Marker) Source |
data PacketType Marker = MarkerType Source |

data LiteralData Source

Constructors

LiteralData |

Fields

_literalDataDataType :: DataType
_literalDataFileName :: FileName
_literalDataTimeStamp :: ThirtyTwoBitTimeStamp
_literalDataPayload :: ByteString

Instances

Eq LiteralData Source |
Data LiteralData Source |
Show LiteralData Source |
Pretty LiteralData Source |
Packet LiteralData Source |
Eq (PacketType LiteralData) Source |
Show (PacketType LiteralData) Source |
data PacketType LiteralData = LiteralDataType Source |

data Trust Source

Constructors

Trust |

Fields

_trustPayload :: ByteString

Instances

Eq Trust Source |
Data Trust Source |
Show Trust Source |
Pretty Trust Source |
Packet Trust Source |
Eq (PacketType Trust) Source |
Show (PacketType Trust) Source |
data PacketType Trust = TrustType Source |

data UserId Source

Constructors

UserId |

Fields

_userIdPayload :: Text

Instances

Eq UserId Source |
Data UserId Source |
Show UserId Source |
Pretty UserId Source |
Packet UserId Source |
Eq (PacketType UserId) Source |
Show (PacketType UserId) Source |
data PacketType UserId = UserIdType Source |

data PublicSubkey Source

Constructors

PublicSubkey |

Fields

_publicSubkeyPKPayload :: PKPayload

Instances

Eq PublicSubkey Source |
Data PublicSubkey Source |
Show PublicSubkey Source |
Pretty PublicSubkey Source |
Packet PublicSubkey Source |
Eq (PacketType PublicSubkey) Source |
Show (PacketType PublicSubkey) Source |
data PacketType PublicSubkey = PublicSubkeyType Source |

data UserAttribute Source

Constructors

UserAttribute |

Fields

_userAttributeSubPackets :: [UserAttrSubPacket]

Instances

Eq UserAttribute Source |
Data UserAttribute Source |
Show UserAttribute Source |
Pretty UserAttribute Source |
Packet UserAttribute Source |
Eq (PacketType UserAttribute) Source |
Show (PacketType UserAttribute) Source |
data PacketType UserAttribute = UserAttributeType Source |

data SymEncIntegrityProtectedData Source

Constructors

SymEncIntegrityProtectedData |

Fields

_symEncIntegrityProtectedDataPacketVersion :: PacketVersion
_symEncIntegrityProtectedDataPayload :: ByteString

Instances

Eq SymEncIntegrityProtectedData Source |
Data SymEncIntegrityProtectedData Source |
Show SymEncIntegrityProtectedData Source |
Pretty SymEncIntegrityProtectedData Source |
Packet SymEncIntegrityProtectedData Source |
Eq (PacketType SymEncIntegrityProtectedData) Source |
Show (PacketType SymEncIntegrityProtectedData) Source |
data PacketType SymEncIntegrityProtectedData = SymEncIntegrityProtectedDataType Source |

data ModificationDetectionCode Source

Constructors

ModificationDetectionCode |

Fields

_modificationDetectionCodePayload :: ByteString

Instances

Eq ModificationDetectionCode Source |
Data ModificationDetectionCode Source |
Show ModificationDetectionCode Source |
Pretty ModificationDetectionCode Source |
Packet ModificationDetectionCode Source |
Eq (PacketType ModificationDetectionCode) Source |
Show (PacketType ModificationDetectionCode) Source |
data PacketType ModificationDetectionCode = ModificationDetectionCodeType Source |

data OtherPacket Source

Constructors

OtherPacket |

Fields

_otherPacketType :: Word8
_otherPacketPayload :: ByteString

Instances

Eq OtherPacket Source |
Data OtherPacket Source |
Show OtherPacket Source |
Pretty OtherPacket Source |
Packet OtherPacket Source |
Eq (PacketType OtherPacket) Source |
Show (PacketType OtherPacket) Source |
data PacketType OtherPacket = OtherPacketType Source |

data BrokenPacket Source

Constructors

BrokenPacket |

Fields

_brokenPacketParseError :: String
_brokenPacketType :: Word8
_brokenPacketPayload :: ByteString

Instances

Eq BrokenPacket Source |
Data BrokenPacket Source |
Show BrokenPacket Source |
Pretty BrokenPacket Source |
Packet BrokenPacket Source |
Eq (PacketType BrokenPacket) Source |
Show (PacketType BrokenPacket) Source |
data PacketType BrokenPacket = BrokenPacketType Source |

pkeskPubKeyAlgorithm :: Lens' PKESK PubKeyAlgorithm Source

pkeskPacketVersion :: Lens' PKESK PacketVersion Source

pkeskMPIs :: Lens' PKESK (NonEmpty MPI) Source

pkeskEightOctetKeyId :: Lens' PKESK EightOctetKeyId Source

signaturePayload :: Iso' Signature SignaturePayload Source

skeskSymmetricAlgorithm :: Lens' SKESK SymmetricAlgorithm Source

skeskS2K :: Lens' SKESK S2K Source

skeskPacketVersion :: Lens' SKESK PacketVersion Source

skeskESK :: Lens' SKESK (Maybe ByteString) Source

onePassSignatureSigType :: Lens' OnePassSignature SigType Source

onePassSignaturePubKeyAlgorithm :: Lens' OnePassSignature PubKeyAlgorithm Source

onePassSignaturePacketVersion :: Lens' OnePassSignature PacketVersion Source

onePassSignatureNestedFlag :: Lens' OnePassSignature NestedFlag Source

onePassSignatureHashAlgorithm :: Lens' OnePassSignature HashAlgorithm Source

onePassSignatureEightOctetKeyId :: Lens' OnePassSignature EightOctetKeyId Source

secretKeySKAddendum :: Lens' SecretKey SKAddendum Source

secretKeyPKPayload :: Lens' SecretKey PKPayload Source

v3exp :: Lens' PKPayload V3Expiration Source

timestamp :: Lens' PKPayload ThirtyTwoBitTimeStamp Source

pubkey :: Lens' PKPayload PKey Source

pkalgo :: Lens' PKPayload PubKeyAlgorithm Source

keyVersion :: Lens' PKPayload KeyVersion Source

publicKeyPKPayload :: Iso' PublicKey PKPayload Source

secretSubkeySKAddendum :: Lens' SecretSubkey SKAddendum Source

secretSubkeyPKPayload :: Lens' SecretSubkey PKPayload Source

compressedDataPayload :: Lens' CompressedData CompressedDataPayload Source

compressedDataCompressionAlgorithm :: Lens' CompressedData CompressionAlgorithm Source

symEncDataPayload :: Iso' SymEncData ByteString Source

markerPayload :: Iso' Marker ByteString Source

literalDataTimeStamp :: Lens' LiteralData ThirtyTwoBitTimeStamp Source

literalDataPayload :: Lens' LiteralData ByteString Source

literalDataFileName :: Lens' LiteralData FileName Source

literalDataDataType :: Lens' LiteralData DataType Source

trustPayload :: Iso' Trust ByteString Source

userIdPayload :: Iso' UserId Text Source

publicSubkeyPKPayload :: Iso' PublicSubkey PKPayload Source

userAttributeSubPackets :: Iso' UserAttribute [UserAttrSubPacket] Source

symEncIntegrityProtectedDataPayload :: Lens' SymEncIntegrityProtectedData ByteString Source

symEncIntegrityProtectedDataPacketVersion :: Lens' SymEncIntegrityProtectedData PacketVersion Source

modificationDetectionCodePayload :: Iso' ModificationDetectionCode ByteString Source

otherPacketType :: Lens' OtherPacket Word8 Source

otherPacketPayload :: Lens' OtherPacket ByteString Source

brokenPacketType :: Lens' BrokenPacket Word8 Source

brokenPacketPayload :: Lens' BrokenPacket ByteString Source

brokenPacketParseError :: Lens' BrokenPacket String Source

data PKey Source

Constructors

RSAPubKey RSA_PublicKey |
DSAPubKey DSA_PublicKey |
ElGamalPubKey [Integer] |
ECDHPubKey ECDSA_PublicKey HashAlgorithm SymmetricAlgorithm |
ECDSAPubKey ECDSA_PublicKey |
UnknownPKey ByteString |

Instances

Eq PKey Source |
Data PKey Source |
Ord PKey Source |
Show PKey Source |
Generic PKey Source |
ToJSON PKey Source |
Hashable PKey Source |
Pretty PKey Source |
type Rep PKey Source |

data SKey Source

Constructors

RSAPrivateKey RSA_PrivateKey |
DSAPrivateKey DSA_PrivateKey |
ElGamalPrivateKey [Integer] |
ECDHPrivateKey ECDSA_PrivateKey |
ECDSAPrivateKey ECDSA_PrivateKey |
UnknownSKey ByteString |

Instances

Eq SKey Source |
Data SKey Source |
Show SKey Source |
Generic SKey Source |
ToJSON SKey Source |
Hashable SKey Source |
Pretty SKey Source |
type Rep SKey Source |

data PKPayload Source

Constructors

PKPayload |

Fields

_keyVersion :: KeyVersion
_timestamp :: ThirtyTwoBitTimeStamp
_v3exp :: V3Expiration
_pkalgo :: PubKeyAlgorithm
_pubkey :: PKey

Instances

Eq PKPayload Source |
Data PKPayload Source |
Ord PKPayload Source |
Show PKPayload Source |
Generic PKPayload Source |
ToJSON PKPayload Source |
Hashable PKPayload Source |
Pretty PKPayload Source |
type Rep PKPayload Source |

data SKAddendum Source

Constructors

SUS16bit SymmetricAlgorithm S2K IV ByteString |
SUSSHA1 SymmetricAlgorithm S2K IV ByteString |
SUSym SymmetricAlgorithm IV ByteString |
SUUnencrypted SKey Word16 |

Instances

Eq SKAddendum Source |
Data SKAddendum Source |
Ord SKAddendum Source |
Show SKAddendum Source |
Generic SKAddendum Source |
ToJSON SKAddendum Source |
Hashable SKAddendum Source |
Pretty SKAddendum Source |
type Rep SKAddendum Source |

data Pkt Source

Constructors

PKESKPkt PacketVersion EightOctetKeyId PubKeyAlgorithm (NonEmpty MPI) |
SignaturePkt SignaturePayload |
SKESKPkt PacketVersion SymmetricAlgorithm S2K (Maybe ByteString) |
OnePassSignaturePkt PacketVersion SigType HashAlgorithm PubKeyAlgorithm EightOctetKeyId NestedFlag |
SecretKeyPkt PKPayload SKAddendum |
PublicKeyPkt PKPayload |
SecretSubkeyPkt PKPayload SKAddendum |
CompressedDataPkt CompressionAlgorithm CompressedDataPayload |
SymEncDataPkt ByteString |
MarkerPkt ByteString |
LiteralDataPkt DataType FileName ThirtyTwoBitTimeStamp ByteString |
TrustPkt ByteString |
UserIdPkt Text |
PublicSubkeyPkt PKPayload |
UserAttributePkt [UserAttrSubPacket] |
SymEncIntegrityProtectedDataPkt PacketVersion ByteString |
ModificationDetectionCodePkt ByteString |
OtherPacketPkt Word8 ByteString |
BrokenPacketPkt String Word8 ByteString |

Instances

Eq Pkt Source |
Data Pkt Source |
Ord Pkt Source |
Show Pkt Source |
Generic Pkt Source |
ToJSON Pkt Source |
Hashable Pkt Source |
Pretty Pkt Source |
type Rep Pkt Source |

pktTag :: Pkt -> Word8 Source

data Verification Source

Constructors

Verification |

Fields

_verificationSigner :: PKPayload
_verificationSignature :: SignaturePayload

verificationSigner :: Lens' Verification PKPayload Source

verificationSignature :: Lens' Verification SignaturePayload Source

data TK Source

Constructors

TK |

Fields

_tkKey :: (PKPayload, Maybe SKAddendum)
_tkRevs :: [SignaturePayload]
_tkUIDs :: [(Text, [SignaturePayload])]
_tkUAts :: [([UserAttrSubPacket], [SignaturePayload])]
_tkSubs :: [(Pkt, [SignaturePayload])]

Instances

Eq TK Source |
Data TK Source |
Ord TK Source |
Show TK Source |
Generic TK Source |
ToJSON TK Source |
type Rep TK Source |

type KeyringIxs = `[EightOctetKeyId, TwentyOctetFingerprint, Text]` Source

type Keyring = IxSet KeyringIxs TK Source

tkUIDs :: Lens' TK [(Text, [SignaturePayload])] Source

tkUAts :: Lens' TK [([UserAttrSubPacket], [SignaturePayload])] Source

tkSubs :: Lens' TK [(Pkt, [SignaturePayload])] Source

tkRevs :: Lens' TK [SignaturePayload] Source

tkKey :: Lens' TK (PKPayload, Maybe SKAddendum) Source