1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

update docu

This commit is contained in:
Pavol Rusnak 2016-05-31 15:03:25 +02:00
parent ea3bd0b6f8
commit 6f08f3f6a8
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 30 additions and 2 deletions

View File

@ -233,6 +233,21 @@ def Sha3_512.digest(self) -> bytes
Returns the digest of hashed data.
####trezor.crypto.ssss
``` python
def trezor.crypto.ssss.split(m: int, n: int, secret: bytes) -> tuple
```
Split secret to (M of N) shares using Shamir's Secret Sharing Scheme
``` python
def trezor.crypto.ssss.combine(shares: tuple) -> bytes
```
Combine M shares of Shamir's Secret Sharing Scheme into secret
###trezor.crypto.hmac
``` python
@ -257,7 +272,13 @@ Returns the digest of processed data.
##trezor.msg
``` python
def trezor.msg.send(message) -> int
def trezor.msg.setup(ifaces: list) -> None
```
Configures USB interfaces with a list of tuples (interface_number, usage_page)
``` python
def trezor.msg.send(iface: int, message: bytes) -> int
```
Sends message using USB HID (device) or UDP (emulator).
@ -287,6 +308,9 @@ def trezor.ui.blend(ca: int, cb: int, t: float) -> int
``` python
def trezor.ui.animate_pulse(func, ca, cb, speed=200000, delay=30000)
```
``` python
def trezor.ui.rotate_coords(pos: tuple) -> tuple
```
###trezor.ui.display

View File

@ -48,6 +48,10 @@ Syntax used below is a valid Python function declaration with type hints defined
@extmod/modtrezorcrypto/modtrezorcrypto-sha3-512.h
####trezor.crypto.ssss
@extmod/modtrezorcrypto/modtrezorcrypto-ssss.h
###trezor.crypto.hmac
@src/trezor/crypto/hmac.py

View File

@ -38,7 +38,7 @@ STATIC mp_obj_t mod_TrezorMsg_Msg_make_new(const mp_obj_type_t *type, size_t n_a
/// def trezor.msg.setup(ifaces: list) -> None
///
/// Setups USB interfaces with a list of tuples
/// Configures USB interfaces with a list of tuples (interface_number, usage_page)
///
STATIC mp_obj_t mod_TrezorMsg_Msg_setup(mp_obj_t self, mp_obj_t ifaces) {
mp_uint_t iface_cnt;