PER C Decode Functions.
[PER Runtime Library Functions.]
Detailed Description
PER runtime library decode functions handle the decoding of the primitive ASN.1 data types and length variables. Calls to these functions are assembled in the C source code generated by the ASN1C complier to decode complex ASN.1 structures. These functions are also directly callable from within a user's application program if the need to decode a primitive item exists.The procedure to decode a primitive data item is as follows:
- Call the pu_newContext or pu_initContext function to specify the address of the buffer containing the encoded ASN.1 data to be decoded and whether the data is aligned, or unaligned.
- Call the specific decode function to decode the value.
Defines | |
| #define | pd_UnconsUnsigned(pctxt, pvalue) pd_SemiConsUnsigned(pctxt, pvalue, 0U) |
| #define | pd_UnconsUInt64(pctxt, pvalue) pd_SemiConsUInt64(pctxt, pvalue, 0) |
Functions | |
| int | pd_bit (OSCTXT *pctxt, OSBOOL *pvalue) |
| int | pd_bits (OSCTXT *pctxt, OSUINT32 *pvalue, OSUINT32 nbits) |
| int | pd_BigInteger (OSCTXT *pctxt, const char **ppvalue) |
| int | pd_BitString (OSCTXT *pctxt, OSUINT32 *numbits_p, OSOCTET *buffer, OSUINT32 bufsiz) |
| int | pd_BMPString (OSCTXT *pctxt, ASN1BMPString *pvalue, Asn116BitCharSet *permCharSet) |
| int | pd_UniversalString (OSCTXT *pctxt, ASN1UniversalString *pvalue, Asn132BitCharSet *permCharSet) |
| int | pd_byte_align (OSCTXT *pctxt) |
| int | pd_ChoiceOpenTypeExt (OSCTXT *pctxt, const OSOCTET **object_p2, OSUINT32 *pnumocts) |
| int | pd_ConsInteger (OSCTXT *pctxt, OSINT32 *pvalue, OSINT32 lower, OSINT32 upper) |
| int | pd_ConsInt8 (OSCTXT *pctxt, OSINT8 *pvalue, OSINT32 lower, OSINT32 upper) |
| int | pd_ConsInt16 (OSCTXT *pctxt, OSINT16 *pvalue, OSINT32 lower, OSINT32 upper) |
| int | pd_ConsInt64 (OSCTXT *pctxt, OSINT64 *pvalue, OSINT64 lower, OSINT64 upper) |
| int | pd_ConsUnsigned (OSCTXT *pctxt, OSUINT32 *pvalue, OSUINT32 lower, OSUINT32 upper) |
| int | pd_ConsUInt8 (OSCTXT *pctxt, OSUINT8 *pvalue, OSUINT32 lower, OSUINT32 upper) |
| int | pd_ConsUInt16 (OSCTXT *pctxt, OSUINT16 *pvalue, OSUINT32 lower, OSUINT32 upper) |
| int | pd_ConsUInt64 (OSCTXT *pctxt, OSUINT64 *pvalue, OSUINT64 lower, OSUINT64 upper) |
| int | pd_ConsWholeNumber (OSCTXT *pctxt, OSUINT32 *padjusted_value, OSUINT32 range_value) |
| int | pd_ConsWholeNumber64 (OSCTXT *pctxt, OSUINT64 *padjusted_value, OSUINT64 range_value) |
| int | pd_ConstrainedString (OSCTXT *pctxt, const char **string, Asn1CharSet *pCharSet) |
| int | pd_ConstrainedStringEx (OSCTXT *pctxt, const char **string, const char *charSet, OSUINT32 abits, OSUINT32 ubits, OSUINT32 canSetBits) |
| int | pd_16BitConstrainedString (OSCTXT *pctxt, Asn116BitCharString *pString, Asn116BitCharSet *pCharSet) |
| int | pd_32BitConstrainedString (OSCTXT *pctxt, Asn132BitCharString *pString, Asn132BitCharSet *pCharSet) |
| int | pd_DynBitString (OSCTXT *pctxt, ASN1DynBitStr *pBitStr) |
| int | pd_DynOctetString (OSCTXT *pctxt, ASN1DynOctStr *pOctStr) |
| int | pd_GetComponentLength (OSCTXT *pctxt, OSUINT32 itemBits) |
| int | pd_Length (OSCTXT *pctxt, OSUINT32 *pvalue) |
| int | pd_moveBitCursor (OSCTXT *pctxt, int bitOffset) |
| int | pd_ObjectIdentifier (OSCTXT *pctxt, ASN1OBJID *pvalue) |
| int | pd_oid64 (OSCTXT *pctxt, ASN1OID64 *pvalue) |
| int | pd_RelativeOID (OSCTXT *pctxt, ASN1OBJID *pvalue) |
| int | pd_OctetString (OSCTXT *pctxt, OSUINT32 *pnumocts, OSOCTET *buffer, OSUINT32 bufsiz) |
| int | pd_OpenType (OSCTXT *pctxt, const OSOCTET **object_p2, OSUINT32 *pnumocts) |
| int | pd_OpenTypeExt (OSCTXT *pctxt, const OSOCTET **object_p2, OSUINT32 *pnumocts) |
| int | pd_Real (OSCTXT *pctxt, OSREAL *pvalue) |
| int | pd_SmallNonNegWholeNumber (OSCTXT *pctxt, OSUINT32 *pvalue) |
| int | pd_SemiConsInteger (OSCTXT *pctxt, OSINT32 *pvalue, OSINT32 lower) |
| int | pd_SemiConsUnsigned (OSCTXT *pctxt, OSUINT32 *pvalue, OSUINT32 lower) |
| int | pd_SemiConsInt64 (OSCTXT *pctxt, OSINT64 *pvalue, OSINT64 lower) |
| int | pd_SemiConsUInt64 (OSCTXT *pctxt, OSUINT64 *pvalue, OSUINT64 lower) |
| int | pd_UnconsInteger (OSCTXT *pctxt, OSINT32 *pvalue) |
| int | pd_UnconsInt64 (OSCTXT *pctxt, OSINT64 *pvalue) |
| int | pd_VarWidthCharString (OSCTXT *pctxt, const char **pvalue) |
| int | pd_Real10 (OSCTXT *pctxt, const char **ppvalue) |
Define Documentation
|
|
This function will decode an unconstrained unsigned 64-bit integer.
|
|
|
This function will decode an unconstrained unsigned integer.
|
Function Documentation
|
||||||||||||||||
|
This function will encode a constrained ASN.1 character string. This function is normally not called directly but rather is called from Useful Type Character String encode functions that deal with 16-bit strings. The only function that does not release is the pe_BMPString function.
|
|
||||||||||||||||
|
This function will encode a constrained ASN.1 character string. This function is normally not called directly but rather is called from Useful Type Character String encode functions that deal with 32-bit strings. The only function that does not release is the pe_UniversalString function.
|
|
||||||||||||
|
This function decodes a variable of the ASN.1 INTEGER type. In this case, the integer is assumed to be of a larger size than can fit in a C or C++ long type (normally 32 or 64 bits). For example, parameters used to calculate security values are typically larger than these sizes. These variables are stored in character string constant variables. They are represented as hexadecimal strings starting with "0x" prefix. If it is necessary to convert a hexadecimal string to another radix, then use the rtxBigIntSetStr / rtxBigIntToString functions.
|
|
||||||||||||
|
This function will decode a single bit a place the result in an ASN.1 BOOLEAN type variable.
|
|
||||||||||||||||
|
This function will decode a series of multiple bits and place the results in an unsigned integer variable.
|
|
||||||||||||||||||||
|
This function will decode a value of the ASN.1 bit string type whose maximum size is is known in advance. The ASN1C complier generates a call to this function to decode bit string productions or elements that contain a size constraint.
|
|
||||||||||||||||
|
This function will decode a variable of the ASN.1 BMP character string. This differs from the decode routines for the character strings previously described in that the BMP string type is based on 16-bit characters. A 16-bit character string is modeled using an array of unsigned short integers.
|
|
|
This function will position the decode bit cursor on the next byte boundary.
|
|
||||||||||||||||
|
|
|
||||||||||||||||||||
|
This function will decode a 16-bit integer constrained either by a value or value range constraint.
|
|
||||||||||||||||||||
|
This function will decode a 64-bit integer constrained either by a value or value range constraint.
|
|
||||||||||||||||||||
|
This function will decode an 8-bit integer constrained either by a value or value range constraint.
|
|
||||||||||||||||||||
|
This function will decode an integer constrained either by a value or value range constraint.
|
|
||||||||||||||||
|
This function decodes a constrained string value. This is a deprecated version of the function provided for backward compatibility.
|
|
||||||||||||||||||||||||||||
|
This function decodes a constrained string value. This version of the function allows all of the required permitted alphabet constraint parameters to be passed in as arguments.
|
|
||||||||||||||||||||
|
This function will decode a 16-bit unsigned integer constrained either by a value or value range constraint.
|
|
||||||||||||||||||||
|
This function will decode a 64-bit unsigned integer constrained either by a value or value range constraint.
|
|
||||||||||||||||||||
|
This function will decode an 8-bit unsigned integer constrained either by a value or value range constraint.
|
|
||||||||||||||||||||
|
This function will decode an unsigned integer constrained either by a value or value range constraint.
|
|
||||||||||||||||
|
This function decodes a constrained whole number as specified in Section 10.5 of the X.691 standard.
|
|
||||||||||||||||
|
This function decodes a constrained whole number as specified in Section 10.5 of the X.691 standard, represented as 64-bit integer.
|
|
||||||||||||
|
This function will decode a variable of thr ASN.1 BIT STRING type. This function allocates dynamic memory t store the decoded result. The ASN1C complier generates a call to this function to decode an unconstrained bit string production or element.
|
|
||||||||||||
|
This function will decode a value of the ASN.1 octet string type whose maximum size is known in advance. The ASN1C complier generates a call to this function to decode octet string productions or elements that contain a size constraint.
|
|
||||||||||||
|
|
|
||||||||||||
|
This function will decode a length determinant value.
|
|
||||||||||||
|
|
|
||||||||||||
|
This function decodes a value of the ASN.1 object identifier type.
|
|
||||||||||||||||||||
|
This function will decode a value of the ASN.1 octet string type whose maximun size is known in advance. The ASN1C compiler generates a call to this function to decode octet string productions or elements that contain a size constraint.
|
|
||||||||||||
|
This function decodes a value of the ASN.1 object identifier type using 64-bit subidentifiers.
|
|
||||||||||||||||
|
This function will decode an ASN.1 open type. This used to be the ASN.1 ANY type, but now is used in a variety of applications requiring an encoding that can be interpreted by a decoder without prior knowledge of the type of the variable.
|
|
||||||||||||||||
|
This function will decode an ASN.1 open type extension. These are extra fields in a version-2 message that may be present after the ... extension marker. An open type structure (extElem1) is added to a message structure that contains an extension marker but no extension elements. The pd_OpenTypeExt function will populate this structure with the complete extension information (optional bit or choice index, length and data). A subsequent call to pe_OpenTypeExt will cause the saved extension fields to be included in a newly encoded message of the given type.
|
|
||||||||||||
|
This function will decode a value of the binary encoded ASN.1 real type. This function provides support for the plus-infinity special real values.
|
|
||||||||||||
|
This function will decode a value of the decimal encoded ASN.1 real type.
|
|
||||||||||||
|
This function decodes a value of the ASN.1 RELATIVE-OID type.
|
|
||||||||||||||||
|
This function will decode a semi-constrained 64-bit integer.
|
|
||||||||||||||||
|
This function will decode a semi-constrained integer.
|
|
||||||||||||||||
|
This function will decode a semi-constrained unsigned 64-bit integer.
|
|
||||||||||||||||
|
This function will decode a semi-constrained unsigned integer.
|
|
||||||||||||
|
This function will decode a small non-negative whole number as specified in Section 10.6 of the X.691 standard. This is a number that is expected to be small, but whose size is potentially unlimited due to the presence of an extension maker.
|
|
||||||||||||
|
This function will decode an unconstrained 64-bit integer.
|
|
||||||||||||
|
This function will decode an unconstrained integer.
|
|
||||||||||||||||
|
This function will decode a variable of the ASN.1 32-bit character string. This differs from the decode routines for the character strings previously described because the universal string type is based on 32-bit characters. A 32-bit character string is modeled using an array of unsigned integers.
|
|
||||||||||||
|
This function will decode a variable of the ASN.1 character string.
|
