pub fn parse_emergency_reset(payload: &[u8]) -> Result<[u8; 32], PayloadError>Expand description
Parse the payload of CommandOpcode::EmergencyReset.
Layout: magic (4) || io_key (32). The magic must match
EMERGENCY_RESET_MAGIC. No PIN is required since the use case
is “PIN and PUK both forgotten / exhausted”.
Returns io_key once the magic is validated.
§Errors
PayloadError::WrongLenif the payload is not exactly 36 bytes.PayloadError::MagicMismatchif the first 4 bytes are notEMERGENCY_RESET_MAGIC.