/*******************************************************************
 *
 * This file was generated by TIS/ASN1COMP Ver. 4.1, an ASN.1 compiler.
 * TIS/ASN1COMP is Copyright (c) 1998, TIS Labs at Network Associates, Inc.
 *
 * This file was AUTOMATICALLY GENERATED on Fri Apr  9 20:38:17 1999
 *
 ******************************************************************/

/*******************************************************************
 *
 *  .h file to declare ASN.1 functions
 *
 ******************************************************************/

#ifndef pkcs8_ASN_H_
#define pkcs8_ASN_H_

#include <stdio.h>

#include "pkcs8.h"

/*******************************************************************
 *
 * Function declarations
 *
 ******************************************************************/

#define PKINewPKCS8EncryptedData  (PKIPKCS8EncryptedData *)PKINewOCTET_STRING
#define PKIFreePKCS8EncryptedData PKIFreeOCTET_STRING
#define PKISizeofPKCS8EncryptedData PKISizeofOCTET_STRING
#define PKIPackPKCS8EncryptedData PKIPackOCTET_STRING
#define PKIUnpackPKCS8EncryptedData PKIUnpackOCTET_STRING

#define PKINewPrivateKey  (PKIPrivateKey *)PKINewOCTET_STRING
#define PKIFreePrivateKey PKIFreeOCTET_STRING
#define PKISizeofPrivateKey PKISizeofOCTET_STRING
#define PKIPackPrivateKey PKIPackOCTET_STRING
#define PKIUnpackPrivateKey PKIUnpackOCTET_STRING

#define PKINewEncryptionAlgorithmIdentifier  (PKIEncryptionAlgorithmIdentifier *)PKINewAlgorithmIdentifier
#define PKIFreeEncryptionAlgorithmIdentifier PKIFreeAlgorithmIdentifier
#define PKISizeofEncryptionAlgorithmIdentifier PKISizeofAlgorithmIdentifier
#define PKIPackEncryptionAlgorithmIdentifier PKIPackAlgorithmIdentifier
#define PKIUnpackEncryptionAlgorithmIdentifier PKIUnpackAlgorithmIdentifier

#define PKINewPrivateKeyAlgorithmIdentifier  (PKIPrivateKeyAlgorithmIdentifier *)PKINewAlgorithmIdentifier
#define PKIFreePrivateKeyAlgorithmIdentifier PKIFreeAlgorithmIdentifier
#define PKISizeofPrivateKeyAlgorithmIdentifier PKISizeofAlgorithmIdentifier
#define PKIPackPrivateKeyAlgorithmIdentifier PKIPackAlgorithmIdentifier
#define PKIUnpackPrivateKeyAlgorithmIdentifier PKIUnpackAlgorithmIdentifier

PKIEncryptedPrivateKeyInfo *PKINewEncryptedPrivateKeyInfo(
    PKICONTEXT *ctx);
void PKIFreeEncryptedPrivateKeyInfo(
    PKICONTEXT *ctx,
    PKIEncryptedPrivateKeyInfo *f);
size_t PKISizeofEncryptedPrivateKeyInfo (
    PKICONTEXT *ctx,
    PKIEncryptedPrivateKeyInfo *asnstruct,
    int outerSizeFlag);
size_t PKIPackEncryptedPrivateKeyInfo(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIEncryptedPrivateKeyInfo *asnstruct,
    int *erret);
size_t PKIUnpackEncryptedPrivateKeyInfo(
    PKICONTEXT *ctx,
    PKIEncryptedPrivateKeyInfo **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

PKIPrivateKeyInfo *PKINewPrivateKeyInfo(
    PKICONTEXT *ctx);
void PKIFreePrivateKeyInfo(
    PKICONTEXT *ctx,
    PKIPrivateKeyInfo *f);
size_t PKISizeofPrivateKeyInfo (
    PKICONTEXT *ctx,
    PKIPrivateKeyInfo *asnstruct,
    int outerSizeFlag);
size_t PKIPackPrivateKeyInfo(
    PKICONTEXT *ctx,
    unsigned char *buf,
    size_t buflen,
    PKIPrivateKeyInfo *asnstruct,
    int *erret);
size_t PKIUnpackPrivateKeyInfo(
    PKICONTEXT *ctx,
    PKIPrivateKeyInfo **asnstruct,
    const unsigned char *buf,
    size_t buflen,
    int *erret);

#endif /* pkcs8_ASN_H_ */
