Skip to main content

parse_emergency_reset

Function parse_emergency_reset 

Source
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