From 72a41182c2ca9c5195b0b1b300043b34361f9e96 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Sat, 12 Nov 2016 15:03:45 +0100 Subject: [PATCH] apps.common.storage: fix device_id generator --- src/apps/common/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/common/storage.py b/src/apps/common/storage.py index c64d1b1209..ab2025b87c 100644 --- a/src/apps/common/storage.py +++ b/src/apps/common/storage.py @@ -108,4 +108,4 @@ def _set(key: int, val): def _new_device_id() -> str: from ubinascii import hexlify from trezor.crypto import random - return str(hexlify(random.bytes(16))) + return hexlify(random.bytes(12)).decode('ascii').upper()