Skip to main content

load_block

Function load_block 

Source
pub fn load_block(
    block_no: u8,
    last: bool,
    chunk: &[u8],
) -> Result<Capdu, BuildError>
Expand description

Build one LOAD block. block_no is the P2 counter; last sets P1 0x80 (otherwise 0x00, “more blocks”). chunk is one streamed LFDB slice (≤ LOAD_BLOCK_DATA); see the module note on the 'C4' wrapper.

§Errors

Returns BuildError::Overflow if the encoded inputs would exceed the short-APDU plaintext buffer (CAPDU_MAX).