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

#include <stdio.h>
#include <stdlib.h>
#include "asn1BerCppTypes.h"
#include "rtTable.h"
namespace asn1data {

/**************************************************************/
/*                                                            */
/*  GostR3411_2012_256_Digest                                 */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_GostR3411_2012_256_Digest;

typedef struct EXTERN ASN1T_GostR3411_2012_256_Digest {
   ASN1UINT numocts;
   ASN1OCTET data[32];
   // ctors
   ASN1T_GostR3411_2012_256_Digest () : numocts(0) {}
   ASN1T_GostR3411_2012_256_Digest (ASN1UINT _numocts, const ASN1OCTET* _data) :
      numocts (_numocts) {
      memcpy (data, _data, ASN1MIN (numocts, sizeof(data)));
   }
   ASN1T_GostR3411_2012_256_Digest (const char* cstring) {
      if (strlen(cstring) > 0) {
         numocts = ASN1MIN ((strlen(cstring)+1), sizeof(data));
         strncpy ((char*)data, cstring, sizeof(data));
      }
      else numocts = 0;
   }
   ASN1T_GostR3411_2012_256_Digest (ASN1C_GostR3411_2012_256_Digest& srcData);
   // assignment operators
   ASN1T_GostR3411_2012_256_Digest& 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_GostR3411_2012_256_Digest;

class EXTERN ASN1C_GostR3411_2012_256_Digest :
   public ASN1CType
{
protected:
   ASN1T_GostR3411_2012_256_Digest& msgData;
public:
   ASN1C_GostR3411_2012_256_Digest (ASN1T_GostR3411_2012_256_Digest& data);
   ASN1C_GostR3411_2012_256_Digest (
      ASN1MessageBufferIF& msgBuf, ASN1T_GostR3411_2012_256_Digest& data);
   ASN1C_GostR3411_2012_256_Digest (ASN1C_GostR3411_2012_256_Digest& 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_GostR3411_2012_256_Digest& getCopy (ASN1T_GostR3411_2012_256_Digest* pDstData = 0);
   ASN1T_GostR3411_2012_256_Digest* newCopy ();

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

EXTERN int asn1E_GostR3411_2012_256_Digest (ASN1CTXT* pctxt,
   ASN1T_GostR3411_2012_256_Digest *pvalue, ASN1TagType tagging);

EXTERN int asn1D_GostR3411_2012_256_Digest (ASN1CTXT* pctxt,
   ASN1T_GostR3411_2012_256_Digest *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_GostR3411_2012_256_Digest (ASN1CTXT *pctxt, ASN1T_GostR3411_2012_256_Digest* pSrcValue, ASN1T_GostR3411_2012_256_Digest* pDstValue);

/**************************************************************/
/*                                                            */
/*  GostR3411_2012_512_Digest                                 */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_GostR3411_2012_512_Digest;

typedef struct EXTERN ASN1T_GostR3411_2012_512_Digest {
   ASN1UINT numocts;
   ASN1OCTET data[64];
   // ctors
   ASN1T_GostR3411_2012_512_Digest () : numocts(0) {}
   ASN1T_GostR3411_2012_512_Digest (ASN1UINT _numocts, const ASN1OCTET* _data) :
      numocts (_numocts) {
      memcpy (data, _data, ASN1MIN (numocts, sizeof(data)));
   }
   ASN1T_GostR3411_2012_512_Digest (const char* cstring) {
      if (strlen(cstring) > 0) {
         numocts = ASN1MIN ((strlen(cstring)+1), sizeof(data));
         strncpy ((char*)data, cstring, sizeof(data));
      }
      else numocts = 0;
   }
   ASN1T_GostR3411_2012_512_Digest (ASN1C_GostR3411_2012_512_Digest& srcData);
   // assignment operators
   ASN1T_GostR3411_2012_512_Digest& 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_GostR3411_2012_512_Digest;

class EXTERN ASN1C_GostR3411_2012_512_Digest :
   public ASN1CType
{
protected:
   ASN1T_GostR3411_2012_512_Digest& msgData;
public:
   ASN1C_GostR3411_2012_512_Digest (ASN1T_GostR3411_2012_512_Digest& data);
   ASN1C_GostR3411_2012_512_Digest (
      ASN1MessageBufferIF& msgBuf, ASN1T_GostR3411_2012_512_Digest& data);
   ASN1C_GostR3411_2012_512_Digest (ASN1C_GostR3411_2012_512_Digest& 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_GostR3411_2012_512_Digest& getCopy (ASN1T_GostR3411_2012_512_Digest* pDstData = 0);
   ASN1T_GostR3411_2012_512_Digest* newCopy ();

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

EXTERN int asn1E_GostR3411_2012_512_Digest (ASN1CTXT* pctxt,
   ASN1T_GostR3411_2012_512_Digest *pvalue, ASN1TagType tagging);

EXTERN int asn1D_GostR3411_2012_512_Digest (ASN1CTXT* pctxt,
   ASN1T_GostR3411_2012_512_Digest *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_GostR3411_2012_512_Digest (ASN1CTXT *pctxt, ASN1T_GostR3411_2012_512_Digest* pSrcValue, ASN1T_GostR3411_2012_512_Digest* pDstValue);

/**************************************************************/
/*                                                            */
/*  HashAccTextLen                                            */
/*                                                            */
/**************************************************************/

/* Choice tag constants */

#define T_HashAccTextLen_bitAccTextLen  1
#define T_HashAccTextLen_byteAccTextLen 2

class EXTERN ASN1C_HashAccTextLen;

typedef struct EXTERN ASN1T_HashAccTextLen : public ASN1TPDU {
   int t;
   union {
      /* t = 1 */
      ASN1TDynOctStr *bitAccTextLen;
      /* t = 2 */
      ASN1TDynOctStr *byteAccTextLen;
   } u;
   ASN1T_HashAccTextLen () {}
   ASN1T_HashAccTextLen (ASN1C_HashAccTextLen& srcData);
   ~ASN1T_HashAccTextLen ();
} ASN1T_HashAccTextLen;

class EXTERN ASN1C_HashAccTextLen :
   public ASN1CType
{
protected:
   ASN1T_HashAccTextLen& msgData;
public:
   ASN1C_HashAccTextLen (ASN1T_HashAccTextLen& data);
   ASN1C_HashAccTextLen (
      ASN1MessageBufferIF& msgBuf, ASN1T_HashAccTextLen& data);
   ASN1C_HashAccTextLen (ASN1C_HashAccTextLen& 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_HashAccTextLen& getCopy (ASN1T_HashAccTextLen* pDstData = 0);
   ASN1T_HashAccTextLen* newCopy ();

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

EXTERN int asn1E_HashAccTextLen (ASN1CTXT* pctxt,
   ASN1T_HashAccTextLen *pvalue, ASN1TagType tagging);

EXTERN int asn1D_HashAccTextLen (ASN1CTXT* pctxt,
   ASN1T_HashAccTextLen *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_HashAccTextLen (ASN1CTXT *pctxt, ASN1T_HashAccTextLen* pSrcValue, ASN1T_HashAccTextLen* pDstValue);

EXTERN void asn1Free_HashAccTextLen (ASN1CTXT *pctxt, ASN1T_HashAccTextLen* pvalue);

/**************************************************************/
/*                                                            */
/*  HashStateBlob                                             */
/*                                                            */
/**************************************************************/

class EXTERN ASN1C_HashStateBlob;

typedef struct EXTERN ASN1T_HashStateBlob : public ASN1TPDU {
   struct {
      unsigned hashOIDPresent : 1;
      unsigned ctrlSumBufferPresent : 1;
      unsigned resultHashBufferPresent : 1;
   } m;
   ASN1INT algID;
   ASN1TObjId hashOID;
   ASN1TDynOctStr hashBuffer;
   ASN1T_HashAccTextLen accTextLen;
   ASN1TDynOctStr restTextBuffer;
   ASN1TDynOctStr ctrlSumBuffer;
   ASN1TDynOctStr resultHashBuffer;
   ASN1INT flags;
   ASN1T_HashStateBlob ();
   ASN1T_HashStateBlob (ASN1C_HashStateBlob& srcData);
   ~ASN1T_HashStateBlob ();
} ASN1T_HashStateBlob;

class EXTERN ASN1C_HashStateBlob :
   public ASN1CType
{
protected:
   ASN1T_HashStateBlob& msgData;
public:
   ASN1C_HashStateBlob (ASN1T_HashStateBlob& data);
   ASN1C_HashStateBlob (
      ASN1MessageBufferIF& msgBuf, ASN1T_HashStateBlob& data);
   ASN1C_HashStateBlob (ASN1C_HashStateBlob& 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_HashStateBlob& getCopy (ASN1T_HashStateBlob* pDstData = 0);
   ASN1T_HashStateBlob* newCopy ();

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

EXTERN int asn1E_HashStateBlob (ASN1CTXT* pctxt,
   ASN1T_HashStateBlob *pvalue, ASN1TagType tagging);

EXTERN int asn1D_HashStateBlob (ASN1CTXT* pctxt,
   ASN1T_HashStateBlob *pvalue, ASN1TagType tagging, int length);

EXTERN void asn1Copy_HashStateBlob (ASN1CTXT *pctxt, ASN1T_HashStateBlob* pSrcValue, ASN1T_HashStateBlob* pDstValue);

EXTERN void asn1Free_HashStateBlob (ASN1CTXT *pctxt, ASN1T_HashStateBlob* pvalue);

/* Value definitions */

extern EXTERN ASN1OBJID id_tc26_gost3411_2012_256;
extern EXTERN ASN1OBJID id_tc26_gost3411_2012_512;

}
#endif
