]> git.saurik.com Git - apple/security.git/blob - SecurityASN1/inc/pkcs7.h
Security-30.1.tar.gz
[apple/security.git] / SecurityASN1 / inc / pkcs7.h
1 // NOTE: this is a machine generated file--editing not recommended
2 //
3 // pkcs7.h - class definitions for ASN.1 module PKCS7
4 //
5 // This file was generated by snacc on Wed Jun 27 16:40:55 2001
6 // UBC snacc by Mike Sample
7 // A couple of enhancements made by IBM European Networking Center
8
9 #ifndef _pkcs7_h_
10 #define _pkcs7_h_
11
12
13 //------------------------------------------------------------------------------
14 // class declarations:
15
16 class EncryptedDataInt;
17 class EncryptedContentInfo1;
18 class EncryptedData1;
19
20 //------------------------------------------------------------------------------
21 // class definitions:
22
23 /* INTEGER { edVer0 (0) } */
24 class EncryptedDataInt: public AsnInt
25 {
26 public:
27 EncryptedDataInt(): AsnInt() {}
28 EncryptedDataInt (int i): AsnInt (i) {}
29 enum
30 {
31 edVer0 = 0
32 };
33 };
34
35
36 /* OBJECT IDENTIFIER */
37 typedef AsnOid ContentType1;
38
39 /* OCTET STRING */
40 typedef AsnOcts EncryptedContent1;
41
42 /* AlgorithmIdentifier */
43 typedef AlgorithmIdentifier ContentEncryptionAlgorithmIdentifier1;
44
45 class EncryptedContentInfo1: public AsnType
46 {
47 public:
48 ContentType1 contentType;
49 ContentEncryptionAlgorithmIdentifier1 *contentEncryptionAlgorithm;
50 EncryptedContent1 *encryptedContent;
51
52 EncryptedContentInfo1();
53 EncryptedContentInfo1 (const EncryptedContentInfo1 &);
54 virtual ~EncryptedContentInfo1();
55 virtual AsnType *Clone() const;
56
57 virtual AsnType *Copy() const;
58
59 EncryptedContentInfo1 &operator = (const EncryptedContentInfo1 &);
60 AsnLen BEncContent (BUF_TYPE b);
61 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
62
63 AsnLen BEnc (BUF_TYPE b);
64 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
65 int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
66 int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);
67
68 void Print (ostream &os) const;
69 };
70
71
72 class EncryptedData1: public AsnType
73 {
74 public:
75 EncryptedDataInt version;
76 EncryptedContentInfo1 *encryptedContentInfo;
77
78 EncryptedData1();
79 EncryptedData1 (const EncryptedData1 &);
80 virtual ~EncryptedData1();
81 virtual AsnType *Clone() const;
82
83 virtual AsnType *Copy() const;
84
85 EncryptedData1 &operator = (const EncryptedData1 &);
86 AsnLen BEncContent (BUF_TYPE b);
87 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
88
89 AsnLen BEnc (BUF_TYPE b);
90 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
91 int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
92 int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);
93
94 void Print (ostream &os) const;
95 };
96
97
98 //------------------------------------------------------------------------------
99 // externs for value defs
100
101 #define pkcs_7_arc 1, 2, 840, 113549, 1, 7
102 #define pkcs_7 AsnOid(pkcs_7_arc)
103 #define dataPkcs7_arc 1, 2, 840, 113549, 1, 7, 1
104 #define dataPkcs7 AsnOid(dataPkcs7_arc)
105 #define signedData_arc 1, 2, 840, 113549, 1, 7, 2
106 #define signedData AsnOid(signedData_arc)
107 #define envelopedData_arc 1, 2, 840, 113549, 1, 7, 3
108 #define envelopedData AsnOid(envelopedData_arc)
109 #define signedAndEnvelopedData_arc 1, 2, 840, 113549, 1, 7, 4
110 #define signedAndEnvelopedData AsnOid(signedAndEnvelopedData_arc)
111 #define digestedData_arc 1, 2, 840, 113549, 1, 7, 5
112 #define digestedData AsnOid(digestedData_arc)
113 #define encryptedData_arc 1, 2, 840, 113549, 1, 7, 6
114 #define encryptedData AsnOid(encryptedData_arc)
115 //------------------------------------------------------------------------------
116
117 #endif /* conditional include of pkcs7.h */