pub fn delete_key(kid: Option<u8>, kvn: Option<u8>) -> Result<Capdu, BuildError>Expand description
Build DELETE [key]. kid → tag 'D0', kvn → tag 'D2'; None omits the
tag (multi-key delete, GPCS Table 11-24). Supplying both deletes a single
key. Omission is encoded by leaving the tag off the wire — never a
0xFF/0x00 sentinel byte.
CLA=84 INS=E4 P1=00 P2=00, Data = ['D0' 01 kid] ['D2' 01 kvn]. Le=00.
§Errors
Returns BuildError::EmptyKeyScope if both kid and kvn are None
(Table 11-24 needs at least one), or BuildError::Overflow if the encoded
inputs would exceed the short-APDU plaintext buffer (CAPDU_MAX).