/**
 * This file was generated by the Objective Systems ASN1C Compiler
 * (http://www.obj-sys.com).  Version: 5.63.
 */
#ifndef PKCS_8_H
#define PKCS_8_H

#include <stdio.h>
#include <stdlib.h>
#include "asn1BerCppTypes.h"
#include "rtTable.h"
#include "ASN1CSeqOfList.h"
#include "ASN1CBitStr.h"
#include "PKIX1Explicit88.h"
#include "PKIX1Explicit88BaseTypes.h"
namespace asn1data {

/**************************************************************/
/*                                                            */
/*  OneAsymKeyVersion                                         */
/*                                                            */
/**************************************************************/

struct EXTERN OneAsymKeyVersion {
   enum Root {
      oneasymkey_v1 = 0,
      oneasymkey_v2 = 1
   } ;
} ;

typedef ASN1UINT ASN1T_OneAsymKeyVersion;

class EXTERN ASN1C_OneAsymKeyVersion :
   public ASN1CType
{
protected:
   ASN1T_OneAsymKeyVersion& msgData;
public:
   ASN1C_OneAsymKeyVersion (ASN1T_OneAsymKeyVersion& data);
   ASN1C_OneAsymKeyVersion (
      ASN1MessageBufferIF& msgBuf, ASN1T_OneAsymKeyVersion& data);
   ASN1C_OneAsymKeyVersion (ASN1C_OneAsymKeyVersion& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_OneAsymKeyVersion& getCopy (ASN1T_OneAsymKeyVersion* pDstData = 0);
   ASN1T_OneAsymKeyVersion* newCopy ();

   inline ASN1C_OneAsymKeyVersion& operator= (ASN1C_OneAsymKeyVersion& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
} ;

EXTERN int asn1E_OneAsymKeyVersion (ASN1CTXT* pctxt,
   ASN1T_OneAsymKeyVersion *pvalue, ASN1TagType tagging);

EXTERN int asn1D_OneAsymKeyVersion (ASN1CTXT* pctxt,
   ASN1T_OneAsymKeyVersion *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_OneAsymKeyVersion (ASN1CTXT *pctxt, ASN1T_OneAsymKeyVersion* pSrcValue, ASN1T_OneAsymKeyVersion* pDstValue);

/**************************************************************/
/*                                                            */
/*  PrivateKeyAlgorithmIdentifier                             */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_PrivateKeyAlgorithmIdentifier;

typedef ASN1T_AlgorithmIdentifier ASN1T_PrivateKeyAlgorithmIdentifier;

class EXTERN ASN1C_PrivateKeyAlgorithmIdentifier :
   public ASN1C_AlgorithmIdentifier
{
protected:
public:
   ASN1C_PrivateKeyAlgorithmIdentifier (ASN1T_PrivateKeyAlgorithmIdentifier& data);
   ASN1C_PrivateKeyAlgorithmIdentifier (
      ASN1MessageBufferIF& msgBuf, ASN1T_PrivateKeyAlgorithmIdentifier& data);
   ASN1C_PrivateKeyAlgorithmIdentifier (ASN1C_PrivateKeyAlgorithmIdentifier& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_PrivateKeyAlgorithmIdentifier& getCopy (ASN1T_PrivateKeyAlgorithmIdentifier* pDstData = 0);
   ASN1T_PrivateKeyAlgorithmIdentifier* newCopy ();

   inline ASN1C_PrivateKeyAlgorithmIdentifier& operator= (ASN1C_PrivateKeyAlgorithmIdentifier& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
} ;

EXTERN int asn1E_PrivateKeyAlgorithmIdentifier (ASN1CTXT* pctxt,
   ASN1T_PrivateKeyAlgorithmIdentifier *pvalue, ASN1TagType tagging);

EXTERN int asn1D_PrivateKeyAlgorithmIdentifier (ASN1CTXT* pctxt,
   ASN1T_PrivateKeyAlgorithmIdentifier *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_PrivateKeyAlgorithmIdentifier (ASN1CTXT *pctxt, ASN1T_PrivateKeyAlgorithmIdentifier* pSrcValue, ASN1T_PrivateKeyAlgorithmIdentifier* pDstValue);

EXTERN void asn1Free_PrivateKeyAlgorithmIdentifier (ASN1CTXT *pctxt, ASN1T_PrivateKeyAlgorithmIdentifier* pvalue);

/**************************************************************/
/*                                                            */
/*  PrivateKey                                                */
/*                                                            */
/**************************************************************/

typedef ASN1TDynOctStr ASN1T_PrivateKey;

class EXTERN ASN1C_PrivateKey :
   public ASN1CType
{
protected:
   ASN1T_PrivateKey& msgData;
public:
   ASN1C_PrivateKey (ASN1T_PrivateKey& data);
   ASN1C_PrivateKey (
      ASN1MessageBufferIF& msgBuf, ASN1T_PrivateKey& data);
   ASN1C_PrivateKey (ASN1C_PrivateKey& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_PrivateKey& getCopy (ASN1T_PrivateKey* pDstData = 0);
   ASN1T_PrivateKey* newCopy ();

   inline ASN1C_PrivateKey& operator= (ASN1C_PrivateKey& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
} ;

EXTERN int asn1E_PrivateKey (ASN1CTXT* pctxt,
   ASN1T_PrivateKey *pvalue, ASN1TagType tagging);

EXTERN int asn1D_PrivateKey (ASN1CTXT* pctxt,
   ASN1T_PrivateKey *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_PrivateKey (ASN1CTXT *pctxt, ASN1T_PrivateKey* pSrcValue, ASN1T_PrivateKey* pDstValue);

EXTERN void asn1Free_PrivateKey (ASN1CTXT *pctxt, ASN1T_PrivateKey* pvalue);

/**************************************************************/
/*                                                            */
/*  Attributes                                                */
/*                                                            */
/**************************************************************/

/* List of ASN1T_Attribute */
typedef struct EXTERN ASN1T_Attributes : public ASN1TPDUSeqOfList {
   ~ASN1T_Attributes();
} ASN1T_Attributes;

class EXTERN ASN1C_Attributes :
   public ASN1CSeqOfList
{
protected:
   ASN1T_Attributes& msgData;
public:
   ASN1C_Attributes (ASN1T_Attributes& data);
   ASN1C_Attributes (
      ASN1MessageBufferIF& msgBuf, ASN1T_Attributes& data);
   ASN1C_Attributes (ASN1C_Attributes& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_Attributes& getCopy (ASN1T_Attributes* pDstData = 0);
   ASN1T_Attributes* newCopy ();

   ASN1C_Attributes& operator= (ASN1C_Attributes& srcData);
   void Append (ASN1T_Attribute * elem) {
      append ((void*)elem);
   }
} ;

EXTERN int asn1E_Attributes (ASN1CTXT* pctxt,
   ASN1T_Attributes *pvalue, ASN1TagType tagging);

EXTERN int asn1D_Attributes (ASN1CTXT* pctxt,
   ASN1T_Attributes *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_Attributes (ASN1CTXT *pctxt, ASN1T_Attributes* pSrcValue, ASN1T_Attributes* pDstValue);

EXTERN void asn1Free_Attributes (ASN1CTXT *pctxt, ASN1T_Attributes* pvalue);

/**************************************************************/
/*                                                            */
/*  PublicKey                                                 */
/*                                                            */
/**************************************************************/

typedef ASN1TDynBitStr ASN1T_PublicKey;

class EXTERN ASN1C_PublicKey :
   public ASN1CBitStr
{
protected:
   ASN1T_PublicKey& msgData;
public:
   ASN1C_PublicKey (ASN1T_PublicKey& data);
   ASN1C_PublicKey (
      ASN1MessageBufferIF& msgBuf, ASN1T_PublicKey& data);
   ASN1C_PublicKey (ASN1C_PublicKey& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_PublicKey& getCopy (ASN1T_PublicKey* pDstData = 0);
   ASN1T_PublicKey* newCopy ();

   ASN1C_PublicKey& operator= (ASN1C_PublicKey& srcData);
} ;

EXTERN int asn1E_PublicKey (ASN1CTXT* pctxt,
   ASN1T_PublicKey *pvalue, ASN1TagType tagging);

EXTERN int asn1D_PublicKey (ASN1CTXT* pctxt,
   ASN1T_PublicKey *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_PublicKey (ASN1CTXT *pctxt, ASN1T_PublicKey* pSrcValue, ASN1T_PublicKey* pDstValue);

EXTERN void asn1Free_PublicKey (ASN1CTXT *pctxt, ASN1T_PublicKey* pvalue);

/**************************************************************/
/*                                                            */
/*  OneAsymmetricKey                                          */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_OneAsymmetricKey;

typedef struct EXTERN ASN1T_OneAsymmetricKey : public ASN1TPDU {
   struct {
      unsigned attributesPresent : 1;
      unsigned publicKeyPresent : 1;
   } m;
   ASN1T_OneAsymKeyVersion version;
   ASN1T_PrivateKeyAlgorithmIdentifier privateKeyAlgorithm;
   ASN1T_PrivateKey privateKey;
   ASN1T_Attributes attributes;
   ASN1T_PublicKey publicKey;
   ASN1TSeqExt extElem1;
   ASN1T_OneAsymmetricKey ();
   ASN1T_OneAsymmetricKey (ASN1C_OneAsymmetricKey& srcData);
   ~ASN1T_OneAsymmetricKey ();
} ASN1T_OneAsymmetricKey;

class EXTERN ASN1C_OneAsymmetricKey :
   public ASN1CType
{
protected:
   ASN1T_OneAsymmetricKey& msgData;
public:
   ASN1C_OneAsymmetricKey (ASN1T_OneAsymmetricKey& data);
   ASN1C_OneAsymmetricKey (
      ASN1MessageBufferIF& msgBuf, ASN1T_OneAsymmetricKey& data);
   ASN1C_OneAsymmetricKey (ASN1C_OneAsymmetricKey& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_OneAsymmetricKey& getCopy (ASN1T_OneAsymmetricKey* pDstData = 0);
   ASN1T_OneAsymmetricKey* newCopy ();

   inline ASN1C_OneAsymmetricKey& operator= (ASN1C_OneAsymmetricKey& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
} ;

EXTERN int asn1E_OneAsymmetricKey (ASN1CTXT* pctxt,
   ASN1T_OneAsymmetricKey *pvalue, ASN1TagType tagging);

EXTERN int asn1D_OneAsymmetricKey (ASN1CTXT* pctxt,
   ASN1T_OneAsymmetricKey *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_OneAsymmetricKey (ASN1CTXT *pctxt, ASN1T_OneAsymmetricKey* pSrcValue, ASN1T_OneAsymmetricKey* pDstValue);

EXTERN void asn1Free_OneAsymmetricKey (ASN1CTXT *pctxt, ASN1T_OneAsymmetricKey* pvalue);

/**************************************************************/
/*                                                            */
/*  PrivateKeyInfo                                            */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_PrivateKeyInfo;

typedef ASN1T_OneAsymmetricKey ASN1T_PrivateKeyInfo;

class EXTERN ASN1C_PrivateKeyInfo :
   public ASN1C_OneAsymmetricKey
{
protected:
public:
   ASN1C_PrivateKeyInfo (ASN1T_PrivateKeyInfo& data);
   ASN1C_PrivateKeyInfo (
      ASN1MessageBufferIF& msgBuf, ASN1T_PrivateKeyInfo& data);
   ASN1C_PrivateKeyInfo (ASN1C_PrivateKeyInfo& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_PrivateKeyInfo& getCopy (ASN1T_PrivateKeyInfo* pDstData = 0);
   ASN1T_PrivateKeyInfo* newCopy ();

   inline ASN1C_PrivateKeyInfo& operator= (ASN1C_PrivateKeyInfo& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
} ;

EXTERN int asn1E_PrivateKeyInfo (ASN1CTXT* pctxt,
   ASN1T_PrivateKeyInfo *pvalue, ASN1TagType tagging);

EXTERN int asn1D_PrivateKeyInfo (ASN1CTXT* pctxt,
   ASN1T_PrivateKeyInfo *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_PrivateKeyInfo (ASN1CTXT *pctxt, ASN1T_PrivateKeyInfo* pSrcValue, ASN1T_PrivateKeyInfo* pDstValue);

EXTERN void asn1Free_PrivateKeyInfo (ASN1CTXT *pctxt, ASN1T_PrivateKeyInfo* pvalue);

/**************************************************************/
/*                                                            */
/*  PKInfoEncryptedData                                       */
/*                                                            */
/**************************************************************/

typedef ASN1TDynOctStr ASN1T_PKInfoEncryptedData;

class EXTERN ASN1C_PKInfoEncryptedData :
   public ASN1CType
{
protected:
   ASN1T_PKInfoEncryptedData& msgData;
public:
   ASN1C_PKInfoEncryptedData (ASN1T_PKInfoEncryptedData& data);
   ASN1C_PKInfoEncryptedData (
      ASN1MessageBufferIF& msgBuf, ASN1T_PKInfoEncryptedData& data);
   ASN1C_PKInfoEncryptedData (ASN1C_PKInfoEncryptedData& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_PKInfoEncryptedData& getCopy (ASN1T_PKInfoEncryptedData* pDstData = 0);
   ASN1T_PKInfoEncryptedData* newCopy ();

   inline ASN1C_PKInfoEncryptedData& operator= (ASN1C_PKInfoEncryptedData& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
} ;

EXTERN int asn1E_PKInfoEncryptedData (ASN1CTXT* pctxt,
   ASN1T_PKInfoEncryptedData *pvalue, ASN1TagType tagging);

EXTERN int asn1D_PKInfoEncryptedData (ASN1CTXT* pctxt,
   ASN1T_PKInfoEncryptedData *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_PKInfoEncryptedData (ASN1CTXT *pctxt, ASN1T_PKInfoEncryptedData* pSrcValue, ASN1T_PKInfoEncryptedData* pDstValue);

EXTERN void asn1Free_PKInfoEncryptedData (ASN1CTXT *pctxt, ASN1T_PKInfoEncryptedData* pvalue);

/**************************************************************/
/*                                                            */
/*  EncryptedPrivateKeyInfo                                   */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_EncryptedPrivateKeyInfo;

typedef struct EXTERN ASN1T_EncryptedPrivateKeyInfo : public ASN1TPDU {
   ASN1T_AlgorithmIdentifier encryptionAlgorithm;
   ASN1T_PKInfoEncryptedData encryptedData;
   ASN1T_EncryptedPrivateKeyInfo ();
   ASN1T_EncryptedPrivateKeyInfo (ASN1C_EncryptedPrivateKeyInfo& srcData);
   ~ASN1T_EncryptedPrivateKeyInfo ();
} ASN1T_EncryptedPrivateKeyInfo;

class EXTERN ASN1C_EncryptedPrivateKeyInfo :
   public ASN1CType
{
protected:
   ASN1T_EncryptedPrivateKeyInfo& msgData;
public:
   ASN1C_EncryptedPrivateKeyInfo (ASN1T_EncryptedPrivateKeyInfo& data);
   ASN1C_EncryptedPrivateKeyInfo (
      ASN1MessageBufferIF& msgBuf, ASN1T_EncryptedPrivateKeyInfo& data);
   ASN1C_EncryptedPrivateKeyInfo (ASN1C_EncryptedPrivateKeyInfo& original);

   // standard encode/decode methods (defined in ASN1CType base class):
   // int Encode ();
   // int Decode ();

   // stream encode/decode methods:
   int EncodeTo (ASN1MessageBufferIF& msgBuf);
   int DecodeFrom (ASN1MessageBufferIF& msgBuf);

   ASN1T_EncryptedPrivateKeyInfo& getCopy (ASN1T_EncryptedPrivateKeyInfo* pDstData = 0);
   ASN1T_EncryptedPrivateKeyInfo* newCopy ();

   inline ASN1C_EncryptedPrivateKeyInfo& operator= (ASN1C_EncryptedPrivateKeyInfo& srcData) {
      srcData.getCopy (&msgData);
      return *this;
   }
} ;

EXTERN int asn1E_EncryptedPrivateKeyInfo (ASN1CTXT* pctxt,
   ASN1T_EncryptedPrivateKeyInfo *pvalue, ASN1TagType tagging);

EXTERN int asn1D_EncryptedPrivateKeyInfo (ASN1CTXT* pctxt,
   ASN1T_EncryptedPrivateKeyInfo *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_EncryptedPrivateKeyInfo (ASN1CTXT *pctxt, ASN1T_EncryptedPrivateKeyInfo* pSrcValue, ASN1T_EncryptedPrivateKeyInfo* pDstValue);

EXTERN void asn1Free_EncryptedPrivateKeyInfo (ASN1CTXT *pctxt, ASN1T_EncryptedPrivateKeyInfo* pvalue);

}
#endif
