1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00
trezor-firmware/embed/extmod/modtrezorconfig/storage.h
Jochen Hoenicke c0cd252c83 Store pin as integer
- New module trezor.pin (add timeout here)
- Convert pin to integer by adding a '1' (to detect leading 0s)
- pin is still limited to 9 digits.
2017-12-15 20:37:03 +01:00

21 lines
620 B
C

/*
* Copyright (c) Pavol Rusnak, Jan Pochyla, SatoshiLabs
*
* Licensed under TREZOR License
* see LICENSE file for details
*/
#include <stdint.h>
#include <stddef.h>
#include "secbool.h"
#include "py/obj.h"
void storage_init(void);
void storage_wipe(void);
secbool storage_unlock(const uint32_t pin, mp_obj_t callback);
secbool storage_has_pin(void);
uint32_t storage_pin_wait_time(void);
secbool storage_change_pin(const uint32_t pin, const uint32_t newpin, mp_obj_t callback);
secbool storage_get(uint16_t key, const void **val, uint16_t *len);
secbool storage_set(uint16_t key, const void *val, uint16_t len);