SE050 Driver
API reference
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
se050_apdu.hpp File Reference

ISO 7816-4 C-APDU packing and R-APDU parsing helpers (short + extended length). More...

#include "se050_types.hpp"
#include <cstddef>
#include <cstdint>
#include <cstring>

Go to the source code of this file.

Classes

struct  se050::apdu::StatusWords
 Parsed status words from a response APDU. More...
 

Namespaces

namespace  se050
 
namespace  se050::apdu
 

Functions

Error se050::apdu::BuildCaseShort (std::uint8_t cla, std::uint8_t ins, std::uint8_t p1, std::uint8_t p2, const std::uint8_t *data, std::uint8_t data_len, bool le_present, std::uint8_t le, std::uint8_t *out, std::size_t out_cap, std::size_t *out_len) noexcept
 Build a CASE 3/4 short command when data_len ≤ 255 and a 1-byte Le is enough.
 
Error se050::apdu::BuildCase4Extended (std::uint8_t cla, std::uint8_t ins, std::uint8_t p1, std::uint8_t p2, const std::uint8_t *data, std::size_t data_len, std::uint8_t *out, std::size_t out_cap, std::size_t *out_len) noexcept
 Build a CASE 4 command APDU with extended length encoding.
 
Error se050::apdu::ParseResponse (const std::uint8_t *rsp, std::size_t rsp_len, const std::uint8_t **data_out, std::size_t *data_len_out, StatusWords *sw_out) noexcept
 Parse a simple R-APDU: optional response data followed by SW1 SW2.
 
bool se050::apdu::IsSuccess (const StatusWords &sw) noexcept
 Return true when SW1 == 0x90 and SW2 == 0x00.
 
bool se050::apdu::IsMoreData (const StatusWords &sw) noexcept
 SW1 == 0x61 — more data available via GET RESPONSE (common GlobalPlatform pattern).
 

Detailed Description

ISO 7816-4 C-APDU packing and R-APDU parsing helpers (short + extended length).