#include asn1.h
void asn1_long_err(li)
asn1_long *li;
void asn1_long_init(li, isize)
asn1_long *li;
int length;
void asn1_long_free(li)
asn1_long *li;
void asn1_long_realloc(li, isize)
asn1_long *li;
int length;
void asn1_long_cpy(li1, li2)
asn1_long *li1, *li2;
int asn1_long_cmp(li1, li2)
asn1_long *li1, *li2;
asn1_uint32 asn1_long_hash(ui32, li)
register asn1_uint32 ui32;
asn1_long *li;
The ASN.1 library routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. All ASN.1 routines require the header "asn1.h" to be included.
These routines deal with the creation of long integers represented by the type asn1_long. They have to be created before any long integers can be translated into ASN.1 format.
The
asn1_long
struture is defined in
"asn1.h" :
struct asn1_long { int al; int eb; ASN1_LONG_ITEM *pvalue; char is_allocated; };
and contains the following members :
asn1_long_realloc(\|) changes the size of the asn1_long referenced by li to size isise. The contents will be unchanged up to the lesser of the new and old size.
asn1_long_free(\|) releases a previously allocated long integer. Its arguments is a pointer to an asn1_long previously allocated by asn1_long_init(\|) or asn1_long_realloc(\|).
asn1_long_cpy(\|) copies this second argument li2 into this first li1.
asn1_long_cmp(\|) compares its arguments, and returns an integer less than, equal to, or greatest than 0, according as li1 is less than, equal to, or greatest than li2.
asn1_long_hash(\|) returns the hash code value to be associated with the asn1_long pointed to by li. The first argument is the previous hash code value computed.