|
globalplatform
|
#include "globalplatform/types.h"#include "globalplatform/library.h"#include "globalplatform/error.h"

Go to the source code of this file.
Data Structures | |
| struct | TLV |
| struct | GP_SIMPLE_TLV |
Functions | |
| OPGP_NO_API LONG | read_TLV (const BYTE *buffer, DWORD length, TLV *tlv) |
| Reads a TLV struct from the given buffer. More... | |
| OPGP_NO_API LONG | parse_simple_tlv (const BYTE *buffer, DWORD length, GP_SIMPLE_TLV *tlv) |
| Reads a TLV view from the given buffer without copying the value. | |
| OPGP_NO_API OPGP_ERROR_STATUS | append_tlv (PBYTE buffer, DWORD bufferSize, PDWORD offset, USHORT tag, const BYTE *value, DWORD valueLength) |
| Appends a TLV to the given buffer. | |
| OPGP_NO_API DWORD | convert_byte (BYTE b) |
| Converts a ISO 7816-4 Le Byte into its value. More... | |
| OPGP_NO_API DWORD | get_short (PBYTE buf, DWORD offset) |
| Returns an unsigned short int from the given position. More... | |
| OPGP_NO_API DWORD | get_int (PBYTE buf, DWORD offset) |
| Returns an unsigned int from the given position. More... | |
| DWORD | get_number (PBYTE buf, DWORD offset, BYTE numLength) |
| Returns an unsigned int from the given position by taking just numLength bytes starting at offset into account. More... | |
| OPGP_NO_API LONG | parse_apdu_case (PBYTE apduCommand, DWORD apduCommandLength, PBYTE caseAPDU, PDWORD lc, PDWORD le) |
| Parse the APDU case. | |
| OPGP_NO_API LONG | write_TLV_length (PBYTE buffer, DWORD offset, DWORD lengthLeft, USHORT length) |
| Writes a TLV length field following DER BER rules. More... | |
| OPGP_NO_API LONG | parse_OID_numeric_string (PBYTE oid, DWORD oidLength, char *out, DWORD outLength) |
| Parses a DER encoded OID into a numeric string (e.g. "1.2.840.113549"). | |
This file contains all GlobalPlatform utility functionality.
Converts a ISO 7816-4 Le Byte into its value.
| b | [in] The Le BYTE. |
Returns an unsigned int from the given position.
| buf | [in] The buffer. |
| offset | [in] The offset in the buffer. |
Returns an unsigned int from the given position by taking just numLength bytes starting at offset into account.
| buf | [in] The buffer. |
| offset | [in] The offset in the buffer. |
| numLength | The length of the number. |
Returns an unsigned short int from the given position.
| buf | [in] The buffer. |
| offset | [in] The offset in the buffer. |
Writes a TLV length field following DER BER rules.
Writes a TLV length field following DER BER rules.
| buffer | [out] The byte array to write to. |
| offset | [in] The offset in the buffer. |
| lengthLeft | [in] The length left in the buffer. |
| length | [in] The length value to encode (0-65535). |