ASN1BEREncodeStream Class Reference
[C++ classes for streaming BER encoding.]
#include <ASN1BEREncodeStream.h>
Detailed Description
This class is a base class for other ASN.1 BER output stream's classes. It is derived from the ASN1Stream base class. It contains variables and methods specific to streaming encoding of BER messages.
Public Member Functions | |
| ASN1BEREncodeStream (OSRTOutputStreamIF &os) | |
| ASN1BEREncodeStream (OSRTOutputStreamIF *pos, OSBOOL bOwnStream=TRUE) | |
| virtual void * | getAppInfo () |
| virtual OSRTCtxtPtr | getContext () |
| virtual OSCTXT * | getCtxtPtr () |
| virtual char * | getErrorInfo () |
| virtual char * | getErrorInfo (char *pBuf, size_t &bufSize) |
| virtual int | getStatus () const |
| virtual void | printErrorInfo () |
| virtual void | resetErrorInfo () |
| virtual void | setAppInfo (void *pAppInfo) |
| virtual void | setDiag (OSBOOL value=TRUE) |
| virtual int | close () |
| virtual int | flush () |
| virtual OSBOOL | isOpened () |
| virtual long | write (const OSOCTET *pdata, size_t size) |
| ASN1BEREncodeStream & | operator<< (ASN1CType &val) |
| int | encodeBMPStr (const Asn116BitCharString &val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeBigInt (const char *pval, ASN1TagType tagging=ASN1EXPL) |
| int | encodeBitStr (const OSOCTET *pbits, OSUINT32 numbits, ASN1TagType tagging=ASN1EXPL) |
| int | encodeBitStr (const ASN1DynBitStr &val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeBool (OSBOOL val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeCharStr (const char *pval, ASN1TagType tagging=ASN1EXPL, ASN1TAG tag=0) |
| int | encodeEnum (OSINT32 val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeEoc () |
| int | encodeIndefLen () |
| int | encodeInt (OSINT32 val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeInt8 (OSINT8 val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeInt16 (OSINT16 val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeInt64 (OSINT64 val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeNull (ASN1TagType tagging=ASN1EXPL) |
| int | encodeObj (ASN1CType &val) |
| int | encodeObjId (const ASN1OBJID &val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeObjId64 (const ASN1OID64 &val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeOctStr (const OSOCTET *pocts, OSUINT32 numocts, ASN1TagType tagging=ASN1EXPL) |
| int | encodeOctStr (const ASN1DynOctStr &val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeReal (OSREAL val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeRelativeOID (const ASN1OBJID &val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeTag (ASN1TAG tag) |
| int | encodeTagAndIndefLen (ASN1TAG tag) |
| int | encodeTagAndLen (ASN1TAG tag, OSINT32 len) |
| int | encodeUInt (OSUINT32 val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeUInt8 (OSUINT8 val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeUInt16 (OSUINT16 val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeUInt64 (OSUINT64 val, ASN1TagType tagging=ASN1EXPL) |
| int | encodeUnivStr (const Asn132BitCharString &val, ASN1TagType tagging=ASN1EXPL) |
| OSBOOL | isA (int bufferType) |
Protected Attributes | |
| OSRTOutputStreamIF * | mpStream |
| OSBOOL | mbOwnStream |
Constructor & Destructor Documentation
|
|
A default constructor. Use getStatus() method to determine has error occured during the initialization or not. |
Member Function Documentation
|
|
Closes the input or output stream and releases any system resources associated with the stream. For output streams this function also flushes all internal buffers to the stream.
|
|
||||||||||||
|
This method encodes 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).
|
|
||||||||||||
|
This method encodes a variable of the ASN.1 BIT STRING type.
|
|
||||||||||||||||
|
This method encodes a variable of the ASN.1 BIT STRING type.
|
|
||||||||||||
|
This method encodes a variable of the ASN.1 BMPString type that is based on a 16-bit character sets.
|
|
||||||||||||
|
This method encodes a variable of the ASN.1 BOOLEAN type.
|
|
||||||||||||||||
|
This method encodes a variable of the ASN.1 character string type.
|
|
||||||||||||
|
This method encodes a variable of the ASN.1 ENUMERATED type. The enumerated encoding is identical to that of an integer. The compiler adds additional checks to the generated code to ensure the value is within the given set.
|
|
|
This method encodes end-of-contents octets (EOC) into the stream. EOC is two zero octets (it is documented in the X.690 standard). This method must be called when the encoding of the complex type with indefinite length is finishing.
|
|
|
This method is used to encode the indefinite length indicator. This can be used to manually create an indefinite length wrapper around long or constructed records.
|
|
||||||||||||
|
This method encodes a variable of the ASN.1 INTEGER type.
|
|
||||||||||||
|
This method encodes a 16-bit variable of the ASN.1 INTEGER type.
|
|
||||||||||||
|
This method encodes a 64-bit variable of the ASN.1 INTEGER type.
|
|
||||||||||||
|
This method encodes an 8-bit variable of the ASN.1 INTEGER type.
|
|
|
This method encodes a variable of the ASN.1 NULL type.
|
|
|
This method encodes an ASN.1 constructed object to the stream.
|
|
||||||||||||
|
This method encodes a variable of the ASN.1 OBJECT IDENTIFIER type.
|
|
||||||||||||
|
This method encodes a variable of the ASN.1 OBJECT IDENTIFIER type using 64-bit subidentifiers.
|
|
||||||||||||
|
This method encodes a variable of the ASN.1 OCTET STRING type.
|
|
||||||||||||||||
|
This method encodes a variable of the ASN.1 OCTET STRING type.
|
|
||||||||||||
|
This method encodes a variable of the REAL data type. It provides support for the plus-infinity and minus-infinity special real values. Use the rtxGetPlusInfinity or rtxGetMinusInfinity functions to get these special values.
|
|
||||||||||||
|
This method encodes a variable of the ASN.1 RELATIVE-OID type.
|
|
|
This method is used to encode the ASN.1 tag field that preface each block of message data. The ASN1C compiler generates calls to this function to handle the encoding of user-defined tags within an ASN.1 specification.
|
|
|
This method is used to encode a tag value and an indefinite length. This can be used to manually create an indefinite length wrapper around long or constructed records.
|
|
||||||||||||
|
This method is used to encode the ASN.1 tag and length fields that preface each block of message data.
|
|
||||||||||||
|
This method encodes an unsigned variable of the ASN.1 INTEGER type.
|
|
||||||||||||
|
This method encodes a 16-bit unsigned variable of the ASN.1 INTEGER type.
|
|
||||||||||||
|
This method encodes a 64-bit unsigned variable of the ASN.1 INTEGER type.
|
|
||||||||||||
|
This method encodes an 8-bit unsigned variable of the ASN.1 INTEGER type.
|
|
||||||||||||
|
This method encodes a variable of the ASN.1 UniversalString type that is based on a 32-bit character sets.
|
|
|
Flushes the buffered data to the stream.
|
|
|
Returns a pointer to application-specific information block |
|
|
The getContext method returns the underlying context smart-pointer object.
|
|
|
The getCtxtPtr method returns the underlying C runtime context. This context can be used in calls to C runtime functions.
|
|
||||||||||||
|
Returns error text in a memory buffer. If buffer pointer is specified in parameters (not NULL) then error text will be copied in the passed buffer. Otherwise, this method allocates memory using the 'operator new []' function. The calling routine is responsible to free the memory by using 'operator delete []'.
|
|
|
Returns error text in a dynamic memory buffer. Buffer will be allocated by 'operator new []'. The calling routine is responsible to free the memory by using 'operator delete []'.
|
|
|
This method returns the completion status of previous operation. It can be used to check completion status of constructors or methods, which do not return completion status. If error occurs, use printErrorInfo method to print out the error's description and stack trace. Method resetError can be used to reset error to continue operations after recovering from the error.
|
|
|
This method matches an enumerated identifier defined in the base class. One identifier is declared for each of the derived classes.
|
|
|
Checks, is the stream opened or not.
|
|
|
Encodes an ASN.1 constructed object to the stream. Use getStatus() method to determine has error occured during the operation or not.
|
|
|
The printErrorInfo method prints information on errors contained within the context. |
|
|
The resetErrorInfo method resets information on errors contained within the context. |
|
|
Sets the application-specific information block. |
|
|
The setDiag method will turn diagnostic tracing on or off.
|
|
||||||||||||
|
Write data to the stream. This method writes the given number of octets from the given array to the output stream.
|
The documentation for this class was generated from the following file:
