dsekai
World engine for retrocomputers.
Loading...
Searching...
No Matches
asn.h File Reference

Functions and macros for dealing with ASN.1 formatted data. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ASN_STRING   0x16
 
#define ASN_INT   0x02
 
#define ASN_BLOB   0x04
 
#define ASN_SEQUENCE   0x30
 
#define ASN_FLAG_SIGNED   0x01
 Tread parsed integers as signed.
 
#define ASN_ERROR_INVALID_VALUE_SZ   -1
 Value/buffer size mismatch or overflow occurred.
 
#define ASN_ERROR_UNABLE_TO_ALLOCATE   -2
 
#define ASN_ERROR_UNABLE_TO_LOCK   -3
 
#define ASN_ERROR_INVALID_TYPE   -4
 Invalid ASN.1 Data Types encountered.
 

Functions

int32_t asn_write_int (MEMORY_HANDLE *h_buffer, int32_t idx, int32_t value) SECTION_ASN
 
int32_t asn_write_string (MEMORY_HANDLE *h_buffer, int32_t idx, const char *source, int32_t source_sz) SECTION_ASN
 
int32_t asn_write_blob (MEMORY_HANDLE *h_buffer, int32_t idx, uint8_t *source, int32_t source_sz) SECTION_ASN
 
int32_t asn_write_seq_start (MEMORY_HANDLE *ph_buffer, int32_t idx, int32_t *mark) SECTION_ASN
 
int32_t asn_write_seq_end (MEMORY_HANDLE *ph_buffer, int32_t idx, int32_t *mark) SECTION_ASN
 
int16_t asn_read_short (const uint8_t *asn_buffer, int32_t idx) SECTION_ASN
 Read short object in asn_buffer.
 
int16_t asn_read_int (uint8_t *int_buffer, uint8_t buffer_sz, uint8_t flags, const uint8_t *asn_buffer, int32_t idx) SECTION_ASN
 Read int object in asn_buffer into buffer.
 
int16_t asn_read_string (char *str_buffer, int16_t str_buffer_sz, const uint8_t *asn_buffer, int32_t idx) SECTION_ASN
 Read string object in asn_buffer into str_buffer.
 
int16_t asn_read_meta_ptr (const uint8_t *buffer, int32_t idx, uint8_t *type_out, int32_t *sz_out) SECTION_ASN
 Get metadata for the object at idx in buffer.
 

Detailed Description

Functions and macros for dealing with ASN.1 formatted data.