]> git.saurik.com Git - apple/security.git/blob - SecurityASN1/inc/pkcs1oids.h
Security-28.tar.gz
[apple/security.git] / SecurityASN1 / inc / pkcs1oids.h
1 // NOTE: this is a machine generated file--editing not recommended
2 //
3 // pkcs1oids.h - class definitions for ASN.1 module PKCS1-OIDS
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 _pkcs1oids_h_
10 #define _pkcs1oids_h_
11
12
13 //------------------------------------------------------------------------------
14 // class declarations:
15
16 class RSAPublicKey;
17 class RSAPrivateKey;
18
19 //------------------------------------------------------------------------------
20 // class definitions:
21
22 class RSAPublicKey: public AsnType
23 {
24 public:
25 BigIntegerStr modulus;
26 BigIntegerStr publicExponent;
27
28 RSAPublicKey();
29 RSAPublicKey (const RSAPublicKey &);
30 virtual ~RSAPublicKey();
31 virtual AsnType *Clone() const;
32
33 virtual AsnType *Copy() const;
34
35 RSAPublicKey &operator = (const RSAPublicKey &);
36 AsnLen BEncContent (BUF_TYPE b);
37 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
38
39 AsnLen BEnc (BUF_TYPE b);
40 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
41 int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
42 int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);
43
44 void Print (ostream &os) const;
45 };
46
47
48 class RSAPrivateKey: public AsnType
49 {
50 public:
51 AsnInt version;
52 BigIntegerStr modulus;
53 BigIntegerStr publicExponent;
54 BigIntegerStr privateExponent;
55 BigIntegerStr prime1;
56 BigIntegerStr prime2;
57 BigIntegerStr exponent1;
58 BigIntegerStr exponent2;
59 BigIntegerStr coefficient;
60
61 RSAPrivateKey();
62 RSAPrivateKey (const RSAPrivateKey &);
63 virtual ~RSAPrivateKey();
64 virtual AsnType *Clone() const;
65
66 virtual AsnType *Copy() const;
67
68 RSAPrivateKey &operator = (const RSAPrivateKey &);
69 AsnLen BEncContent (BUF_TYPE b);
70 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
71
72 AsnLen BEnc (BUF_TYPE b);
73 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
74 int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
75 int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);
76
77 void Print (ostream &os) const;
78 };
79
80
81 //------------------------------------------------------------------------------
82 // externs for value defs
83
84 #define rsadsi_arc 1, 2, 840, 113549
85 #define rsadsi AsnOid(rsadsi_arc)
86 #define pkcs_arc 1, 2, 840, 113549, 1
87 #define pkcs AsnOid(pkcs_arc)
88 #define pkcs_1_arc 1, 2, 840, 113549, 1, 1
89 #define pkcs_1 AsnOid(pkcs_1_arc)
90 #define rsaEncryption_arc 1, 2, 840, 113549, 1, 1, 1
91 #define rsaEncryption AsnOid(rsaEncryption_arc)
92 #define md2WithRSAEncryption_arc 1, 2, 840, 113549, 1, 1, 2
93 #define md2WithRSAEncryption AsnOid(md2WithRSAEncryption_arc)
94 #define md4WithRSAEncryption_arc 1, 2, 840, 113549, 1, 1, 3
95 #define md4WithRSAEncryption AsnOid(md4WithRSAEncryption_arc)
96 #define md5WithRSAEncryption_arc 1, 2, 840, 113549, 1, 1, 4
97 #define md5WithRSAEncryption AsnOid(md5WithRSAEncryption_arc)
98 #define sha1withRSAEncryption_arc 1, 2, 840, 113549, 1, 1, 5
99 #define sha1withRSAEncryption AsnOid(sha1withRSAEncryption_arc)
100 #define rsaDigestAlgorithm_arc 1, 2, 840, 113549, 2
101 #define rsaDigestAlgorithm AsnOid(rsaDigestAlgorithm_arc)
102 #define md2_arc 1, 2, 840, 113549, 2, 2
103 #define md2 AsnOid(md2_arc)
104 #define md4_arc 1, 2, 840, 113549, 2, 4
105 #define md4 AsnOid(md4_arc)
106 #define md5_arc 1, 2, 840, 113549, 2, 5
107 #define md5 AsnOid(md5_arc)
108 //------------------------------------------------------------------------------
109
110 #endif /* conditional include of pkcs1oids.h */