1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-29 01:28:10 +00:00
trezor-firmware/src/apps/common/storage.py
2016-09-28 23:30:10 +02:00

18 lines
333 B
Python

from trezor import config
APP_MANAGEMENT = const(1)
CFG_STORAGE = const(1)
def get_storage(session_id):
return config.get(session_id, APP_MANAGEMENT, CFG_STORAGE)
def set_storage(session_id, buf):
config.set(session_id, APP_MANAGEMENT, CFG_STORAGE, buf)
def clear_storage(session_id):
set_storage(session_id, '')