]> git.saurik.com Git - apple/security.git/blob - SecurityASN1/inc/pkcs8.h
Security-28.tar.gz
[apple/security.git] / SecurityASN1 / inc / pkcs8.h
1 // NOTE: this is a machine generated file--editing not recommended
2 //
3 // pkcs8.h - class definitions for ASN.1 module PrivateKeyInformationSyntax
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 _pkcs8_h_
10 #define _pkcs8_h_
11
12
13 //------------------------------------------------------------------------------
14 // class declarations:
15
16 class PrivateKeyInfo;
17 class EncryptedPrivateKeyInfo;
18
19 //------------------------------------------------------------------------------
20 // class definitions:
21
22 /* OCTET STRING */
23 typedef AsnOcts PrivateKey;
24
25 class PrivateKeyInfo: public AsnType
26 {
27 public:
28 AsnInt version;
29 AlgorithmIdentifier *privateKeyAlgorithm;
30 PrivateKey privateKey;
31 Attributes *attributes;
32
33 PrivateKeyInfo();
34 PrivateKeyInfo (const PrivateKeyInfo &);
35 virtual ~PrivateKeyInfo();
36 virtual AsnType *Clone() const;
37
38 virtual AsnType *Copy() const;
39
40 PrivateKeyInfo &operator = (const PrivateKeyInfo &);
41 AsnLen BEncContent (BUF_TYPE b);
42 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
43
44 AsnLen BEnc (BUF_TYPE b);
45 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
46 int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
47 int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);
48
49 void Print (ostream &os) const;
50 };
51
52
53 class EncryptedPrivateKeyInfo: public AsnType
54 {
55 public:
56 AlgorithmIdentifier *encryptionAlgorithm;
57 EncryptedKey encryptedKey;
58
59 EncryptedPrivateKeyInfo();
60 EncryptedPrivateKeyInfo (const EncryptedPrivateKeyInfo &);
61 virtual ~EncryptedPrivateKeyInfo();
62 virtual AsnType *Clone() const;
63
64 virtual AsnType *Copy() const;
65
66 EncryptedPrivateKeyInfo &operator = (const EncryptedPrivateKeyInfo &);
67 AsnLen BEncContent (BUF_TYPE b);
68 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
69
70 AsnLen BEnc (BUF_TYPE b);
71 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
72 int BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded);
73 int BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded);
74
75 void Print (ostream &os) const;
76 };
77
78
79 //------------------------------------------------------------------------------
80 // externs for value defs
81
82 //------------------------------------------------------------------------------
83
84 #endif /* conditional include of pkcs8.h */