Go to the documentation of this file.
12 #ifndef _STREAM_DEFINED
13 #if defined( INC_ALL )
47 #define PGP_SUBPACKET_TIME 2
48 #define PGP_SUBPACKET_KEYID 16
49 #define PGP_SUBPACKET_TYPEANDVALUE 20
50 #define PGP_SUBPACKET_LAST 29
59 #define PGP_PACKET_SIGNATURE_SPECIAL 1000
79 #define PGP_CTB_OPENPGP 0xC0
80 #define PGP_CTB_COMPRESSED 0xA3
84 #define pgpIsCTB( ctb ) ( ( ctb ) & PGP_CTB )
85 #define pgpGetPacketVersion( ctb ) \
86 ( ( ( ( ctb ) & PGP_CTB_OPENPGP ) == PGP_CTB_OPENPGP ) ? \
87 PGP_VERSION_OPENPGP : PGP_VERSION_2 )
88 #define pgpGetPacketType( ctb ) \
89 ( ( ( ( ctb ) & PGP_CTB_OPENPGP ) == PGP_CTB_OPENPGP ) ? \
90 ( ( ctb ) & 0x3F ) : ( ( ( ctb ) >> 2 ) & 0x0F ) )
91 #define pgpIsReservedPacket( type ) ( ( type ) >= 60 && ( type ) <= 63 )
95 #define PGP_VERSION_2 2
96 #define PGP_VERSION_3 3
97 #define PGP_VERSION_OPENPGP 4
101 #define PGP_ALGO_RSA 1
102 #define PGP_ALGO_RSA_ENCRYPT 2
103 #define PGP_ALGO_RSA_SIGN 3
104 #define PGP_ALGO_ELGAMAL 16
105 #define PGP_ALGO_DSA 17
106 #define PGP_ALGO_ECC_RES 18
107 #define PGP_ALGO_ECDSA_RES 19
108 #define PGP_ALGO_PKC_RES1 20
109 #define PGP_ALGO_PKC_RES2 21
113 #define PGP_ALGO_NONE 0
114 #define PGP_ALGO_IDEA 1
115 #define PGP_ALGO_3DES 2
116 #define PGP_ALGO_CAST5 3
117 #define PGP_ALGO_BLOWFISH 4
118 #define PGP_ALGO_ENC_RES1 5
119 #define PGP_ALGO_ENC_RES2 6
120 #define PGP_ALGO_AES_128 7
121 #define PGP_ALGO_AES_192 8
122 #define PGP_ALGO_AES_256 9
123 #define PGP_ALGO_TWOFISH 10
127 #define PGP_ALGO_MD5 1
128 #define PGP_ALGO_SHA 2
129 #define PGP_ALGO_RIPEMD160 3
130 #define PGP_ALGO_HASH_RES1 4
131 #define PGP_ALGO_HASH_RES2 5
132 #define PGP_ALGO_HASH_RES3 6
133 #define PGP_ALGO_HASH_RES4 7
134 #define PGP_ALGO_SHA2_256 8
135 #define PGP_ALGO_SHA2_384 9
136 #define PGP_ALGO_SHA2_512 10
137 #define PGP_ALGO_SHA2_224 11
141 #define PGP_ALGO_ZIP 1
142 #define PGP_ALGO_ZLIB 2
143 #define PGP_ALGO_BZIP2 3
147 #define PGP_ALGO_LAST PGP_ALGO_DSA
152 #define PGP_S2K_HASHED 0xFE
156 #define PGP_SIG_NONE 0x00
157 #define PGP_SIG_DATA 0x00
158 #define PGP_SIG_TEXT 0x01
159 #define PGP_SIG_STANDALONE 0x02
160 #define PGP_SIG_CERT0 0x10
161 #define PGP_SIG_CERT1 0x11
162 #define PGP_SIG_CERT2 0x12
163 #define PGP_SIG_CERT3 0x13
164 #define PGP_SIG_SUBKEY 0x18
165 #define PGP_SIG_PRIMKEY 0x19
166 #define PGP_SIG_DIRECTKEY 0x1F
167 #define PGP_SIG_KEYREV 0x20
168 #define PGP_SIG_SUBKEYREV 0x28
169 #define PGP_SIG_CRL 0x30
170 #define PGP_SIG_TS 0x40
171 #define PGP_SIG_COUNTERSIG 0x50
172 #define PGP_SIG_LAST 0x51
176 #define PGP_VERSION_SIZE 1
177 #define PGP_ALGOID_SIZE 1
182 #define PGP_MAX_USERIDSIZE 256
190 #define PGP_SALTSIZE 8
191 #define PGP_ITERATIONS 1024
196 #define PGP_MIN_HEADER_SIZE 2
197 #define PGP_MAX_HEADER_SIZE 6
198 #define PGP_DATA_HEADER "b\x00\x00\x00\x00\x00"
199 #define PGP_DATA_HEADER_SIZE ( 1 + 1 + 4 )
200 #define PGP_MDC_PACKET_SIZE ( 1 + 1 + 20 )
253 const int ivInfoSize,