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

#include <stdio.h>
#include <stdlib.h>
#include "asn1BerCppTypes.h"
#include "asn1XerCppTypes.h"
#include "rtTable.h"
#include "ASN1CBitStr.h"
#include "Cryptographic-Gost-Useful-Definitions.h"
#include "Gost28147-89-EncryptionSyntax.h"
namespace asn1data {

/**************************************************************/
/*                                                            */
/*  GostR3410_2001_CertificateSignature                       */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_GostR3410_2001_CertificateSignature;

typedef struct EXTERN ASN1T_GostR3410_2001_CertificateSignature {
   ASN1UINT  numbits;
   ASN1OCTET data[64];
   // ctors
   ASN1T_GostR3410_2001_CertificateSignature () : numbits(0) {}
   ASN1T_GostR3410_2001_CertificateSignature (ASN1UINT _numbits, const ASN1OCTET* _data) :
      numbits(_numbits) {
      memcpy (data, _data, sizeof(data));
   }
   ASN1T_GostR3410_2001_CertificateSignature (ASN1C_GostR3410_2001_CertificateSignature& srcData);
} ASN1T_GostR3410_2001_CertificateSignature;

class EXTERN ASN1C_GostR3410_2001_CertificateSignature :
   public ASN1CBitStr, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_GostR3410_2001_CertificateSignature& msgData;
public:
   ASN1C_GostR3410_2001_CertificateSignature (ASN1T_GostR3410_2001_CertificateSignature& data);
   ASN1C_GostR3410_2001_CertificateSignature (
      ASN1MessageBufferIF& msgBuf, ASN1T_GostR3410_2001_CertificateSignature& data);
   ASN1C_GostR3410_2001_CertificateSignature (ASN1C_GostR3410_2001_CertificateSignature& 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_GostR3410_2001_CertificateSignature& getCopy (ASN1T_GostR3410_2001_CertificateSignature* pDstData = 0);
   ASN1T_GostR3410_2001_CertificateSignature* newCopy ();

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

EXTERN int asn1E_GostR3410_2001_CertificateSignature (ASN1CTXT* pctxt,
   ASN1T_GostR3410_2001_CertificateSignature *pvalue, ASN1TagType tagging);

EXTERN int asn1D_GostR3410_2001_CertificateSignature (ASN1CTXT* pctxt,
   ASN1T_GostR3410_2001_CertificateSignature *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_GostR3410_2001_CertificateSignature
  (ASN1CTXT* pctxt, ASN1T_GostR3410_2001_CertificateSignature* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_GostR3410_2001_CertificateSignature (ASN1CTXT *pctxt, ASN1T_GostR3410_2001_CertificateSignature* pSrcValue, ASN1T_GostR3410_2001_CertificateSignature* pDstValue);

/**************************************************************/
/*                                                            */
/*  GostR3410_2001_PublicKey                                  */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_GostR3410_2001_PublicKey;

typedef struct EXTERN ASN1T_GostR3410_2001_PublicKey {
   ASN1UINT numocts;
   ASN1OCTET data[64];
   // ctors
   ASN1T_GostR3410_2001_PublicKey () : numocts(0) {}
   ASN1T_GostR3410_2001_PublicKey (ASN1UINT _numocts, const ASN1OCTET* _data) :
      numocts (_numocts) {
      memcpy (data, _data, ASN1MIN (numocts, sizeof(data)));
   }
   ASN1T_GostR3410_2001_PublicKey (const char* cstring) {
      if (strlen(cstring) > 0) {
         numocts = ASN1MIN ((strlen(cstring)+1), sizeof(data));
         strncpy ((char*)data, cstring, sizeof(data));
      }
      else numocts = 0;
   }
   ASN1T_GostR3410_2001_PublicKey (ASN1C_GostR3410_2001_PublicKey& srcData);
   // assignment operators
   ASN1T_GostR3410_2001_PublicKey& operator= (const char* cstring) {
      if (strlen(cstring) > 0) {
         numocts = ASN1MIN ((strlen(cstring)+1), sizeof(data));
         strncpy ((char*)data, cstring, sizeof(data));
      }
      else numocts = 0;
      return *this;
   }
} ASN1T_GostR3410_2001_PublicKey;

class EXTERN ASN1C_GostR3410_2001_PublicKey :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_GostR3410_2001_PublicKey& msgData;
public:
   ASN1C_GostR3410_2001_PublicKey (ASN1T_GostR3410_2001_PublicKey& data);
   ASN1C_GostR3410_2001_PublicKey (
      ASN1MessageBufferIF& msgBuf, ASN1T_GostR3410_2001_PublicKey& data);
   ASN1C_GostR3410_2001_PublicKey (ASN1C_GostR3410_2001_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_GostR3410_2001_PublicKey& getCopy (ASN1T_GostR3410_2001_PublicKey* pDstData = 0);
   ASN1T_GostR3410_2001_PublicKey* newCopy ();

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

EXTERN int asn1E_GostR3410_2001_PublicKey (ASN1CTXT* pctxt,
   ASN1T_GostR3410_2001_PublicKey *pvalue, ASN1TagType tagging);

EXTERN int asn1D_GostR3410_2001_PublicKey (ASN1CTXT* pctxt,
   ASN1T_GostR3410_2001_PublicKey *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_GostR3410_2001_PublicKey
  (ASN1CTXT* pctxt, ASN1T_GostR3410_2001_PublicKey* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_GostR3410_2001_PublicKey (ASN1CTXT *pctxt, ASN1T_GostR3410_2001_PublicKey* pSrcValue, ASN1T_GostR3410_2001_PublicKey* pDstValue);

/**************************************************************/
/*                                                            */
/*  GostR3410_2001_PublicKeyParameters                        */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_GostR3410_2001_PublicKeyParameters;

typedef struct EXTERN ASN1T_GostR3410_2001_PublicKeyParameters : public ASN1TPDU {
   struct {
      unsigned encryptionParamSetPresent : 1;
   } m;
   ASN1TObjId publicKeyParamSet;
   ASN1TObjId digestParamSet;
   ASN1T_Gost28147_89_ParamSet encryptionParamSet;
   ASN1T_GostR3410_2001_PublicKeyParameters ();
   ASN1T_GostR3410_2001_PublicKeyParameters (ASN1C_GostR3410_2001_PublicKeyParameters& srcData);
} ASN1T_GostR3410_2001_PublicKeyParameters;

class EXTERN ASN1C_GostR3410_2001_PublicKeyParameters :
   public ASN1CType, public ASN1XERSAXDecodeHandler
{
protected:
   ASN1T_GostR3410_2001_PublicKeyParameters& msgData;
   struct ElementID {
      enum {
         _unknown, publicKeyParamSet, digestParamSet, encryptionParamSet
      } ;
   } ;
   int getElementID 
      (const XMLCHAR* const uri, const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   ASN1MemBuf mCurrElemValue;
   int mReqElemCnt;
public:
   ASN1C_GostR3410_2001_PublicKeyParameters (ASN1T_GostR3410_2001_PublicKeyParameters& data);
   ASN1C_GostR3410_2001_PublicKeyParameters (
      ASN1MessageBufferIF& msgBuf, ASN1T_GostR3410_2001_PublicKeyParameters& data);
   ASN1C_GostR3410_2001_PublicKeyParameters (ASN1C_GostR3410_2001_PublicKeyParameters& 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_GostR3410_2001_PublicKeyParameters& getCopy (ASN1T_GostR3410_2001_PublicKeyParameters* pDstData = 0);
   ASN1T_GostR3410_2001_PublicKeyParameters* newCopy ();

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

   // SAX ContentHandler interface

   virtual void startElement 
      (const XMLCHAR* const uri, 
       const XMLCHAR* const localname, 
       const XMLCHAR* const qname, 
       const XMLCHAR* const* attrs);

   virtual void characters 
      (const XMLCHAR* const chars,
       const unsigned int length);

   virtual void endElement
      (const XMLCHAR* const uri,
       const XMLCHAR* const localname,
       const XMLCHAR* const qname);

   virtual void init (int level = 0);
} ;

EXTERN int asn1E_GostR3410_2001_PublicKeyParameters (ASN1CTXT* pctxt,
   ASN1T_GostR3410_2001_PublicKeyParameters *pvalue, ASN1TagType tagging);

EXTERN int asn1D_GostR3410_2001_PublicKeyParameters (ASN1CTXT* pctxt,
   ASN1T_GostR3410_2001_PublicKeyParameters *pvalue, ASN1TagType tagging, int length);

EXTERN int asn1XE_GostR3410_2001_PublicKeyParameters
  (ASN1CTXT* pctxt, ASN1T_GostR3410_2001_PublicKeyParameters* pvalue,
   ASN1ConstCharPtr elemName, ASN1ConstCharPtr attributes);

EXTERN void asn1Copy_GostR3410_2001_PublicKeyParameters (ASN1CTXT *pctxt, ASN1T_GostR3410_2001_PublicKeyParameters* pSrcValue, ASN1T_GostR3410_2001_PublicKeyParameters* pDstValue);

/* Value definitions */

extern EXTERN ASN1OBJID id_GostR3410_2001;
extern EXTERN ASN1OBJID id_GostR3410_2001DH;
extern EXTERN ASN1OBJID id_GostR3411_94_with_GostR3410_2001;
extern EXTERN ASN1OBJID id_GostR3410_2001_TestParamSet;
extern EXTERN ASN1OBJID id_GostR3410_2001_CryptoPro_A_ParamSet;
extern EXTERN ASN1OBJID id_GostR3410_2001_CryptoPro_B_ParamSet;
extern EXTERN ASN1OBJID id_GostR3410_2001_CryptoPro_C_ParamSet;
extern EXTERN ASN1OBJID id_Rolland_curve_256_TestParamSet;
extern EXTERN ASN1OBJID id_Rolland_curve_512_TestParamSet;
extern EXTERN ASN1OBJID id_GostR3410_2001_CryptoPro_XchA_ParamSet;
extern EXTERN ASN1OBJID id_GostR3410_2001_CryptoPro_XchB_ParamSet;

}
#endif
