Skip to main content

handle_emergency_reset

Function handle_emergency_reset 

Source
async fn handle_emergency_reset<H, C>(
    service: &mut CryptoService<H, C>,
    payload: &[u8],
    tx_buf: &mut [u8],
) -> usize
where H: AteccHal, C: Clock, H::Error: Debug,
Expand description

Handler for the EmergencyReset opcode.

On success the response payload contains the freshly generated 8-digit PUK so the caller can display it to the user. The handler returns EmergencyResetNotPermitted (carrying the actual tries remaining) if the user still has any PIN or PUK attempts.