update docu

This commit is contained in:
Pavol Rusnak 2016-05-05 22:12:26 +02:00
parent 3d8f8a659a
commit 08009cbeb6
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 32 additions and 0 deletions

View File

@ -21,6 +21,8 @@ def trezor.crypto.base58.decode_check(string: str) -> bytes
###trezor.crypto.curve ###trezor.crypto.curve
####trezor.crypto.curve.ed25519
``` python ``` python
def trezor.crypto.curve.ed25519.publickey(self, secret_key: bytes) -> bytes def trezor.crypto.curve.ed25519.publickey(self, secret_key: bytes) -> bytes
``` ```
@ -31,6 +33,8 @@ def trezor.crypto.curve.ed25519.sign(self, secret_key: bytes, message: bytes) ->
def trezor.crypto.curve.ed25519.verify(self, public_key: bytes, signature: bytes, message: bytes) -> bool def trezor.crypto.curve.ed25519.verify(self, public_key: bytes, signature: bytes, message: bytes) -> bool
``` ```
####trezor.crypto.curve.nist256p1
``` python ``` python
def trezor.crypto.curve.nist256p1.publickey(self, secret_key: bytes, compressed: bool=True) -> bytes def trezor.crypto.curve.nist256p1.publickey(self, secret_key: bytes, compressed: bool=True) -> bytes
``` ```
@ -41,6 +45,8 @@ def trezor.crypto.curve.nist256p1.sign(self, secret_key: bytes, message: bytes)
def trezor.crypto.curve.nist256p1.verify(self, public_key: bytes, signature: bytes, message: bytes) -> bool def trezor.crypto.curve.nist256p1.verify(self, public_key: bytes, signature: bytes, message: bytes) -> bool
``` ```
####trezor.crypto.curve.secp256k1
``` python ``` python
def trezor.crypto.curve.secp256k1.publickey(self, secret_key: bytes, compressed: bool=True) -> bytes def trezor.crypto.curve.secp256k1.publickey(self, secret_key: bytes, compressed: bool=True) -> bytes
``` ```
@ -53,6 +59,8 @@ def trezor.crypto.curve.secp256k1.verify(self, public_key: bytes, signature: byt
###trezor.crypto.hashlib ###trezor.crypto.hashlib
####trezor.crypto.hashlib.ripemd160
``` python ``` python
def trezor.crypto.hashlib.ripemd160(self, data: bytes=None) -> Ripemd160 def trezor.crypto.hashlib.ripemd160(self, data: bytes=None) -> Ripemd160
``` ```
@ -63,6 +71,8 @@ def Ripemd160.update(self, data: bytes) -> None
def Ripemd160.digest(self) -> bytes def Ripemd160.digest(self) -> bytes
``` ```
####trezor.crypto.hashlib.sha256
``` python ``` python
def trezor.crypto.hashlib.sha256(self, data: bytes=None) -> Sha256 def trezor.crypto.hashlib.sha256(self, data: bytes=None) -> Sha256
``` ```
@ -73,6 +83,8 @@ def Sha256.update(self, data: bytes) -> None
def Sha256.digest(self) -> bytes def Sha256.digest(self) -> bytes
``` ```
####trezor.crypto.hashlib.sha512
``` python ``` python
def trezor.crypto.hashlib.sha512(self, data: bytes=None) -> Sha512 def trezor.crypto.hashlib.sha512(self, data: bytes=None) -> Sha512
``` ```
@ -83,6 +95,8 @@ def Sha512.hash(self, data: bytes) -> None
def Sha512.digest(self) -> bytes def Sha512.digest(self) -> bytes
``` ```
####trezor.crypto.hashlib.sha3_256
``` python ``` python
def trezor.crypto.hashlib.sha3_256(self, data: bytes=None) -> Sha3_256 def trezor.crypto.hashlib.sha3_256(self, data: bytes=None) -> Sha3_256
``` ```
@ -93,6 +107,8 @@ def Sha3_256.update(self, data: bytes) -> None
def Sha3_256.digest(self) -> bytes def Sha3_256.digest(self) -> bytes
``` ```
####trezor.crypto.hashlib.sha3_512
``` python ``` python
def trezor.crypto.hashlib.sha3_512(self, data: bytes=None) -> Sha3_512 def trezor.crypto.hashlib.sha3_512(self, data: bytes=None) -> Sha3_512
``` ```

View File

@ -10,22 +10,38 @@ Syntax used below is a valid Python function declaration with type hints defined
###trezor.crypto.curve ###trezor.crypto.curve
####trezor.crypto.curve.ed25519
@extmod/modtrezorcrypto/modtrezorcrypto-ed25519.h @extmod/modtrezorcrypto/modtrezorcrypto-ed25519.h
####trezor.crypto.curve.nist256p1
@extmod/modtrezorcrypto/modtrezorcrypto-nist256p1.h @extmod/modtrezorcrypto/modtrezorcrypto-nist256p1.h
####trezor.crypto.curve.secp256k1
@extmod/modtrezorcrypto/modtrezorcrypto-secp256k1.h @extmod/modtrezorcrypto/modtrezorcrypto-secp256k1.h
###trezor.crypto.hashlib ###trezor.crypto.hashlib
####trezor.crypto.hashlib.ripemd160
@extmod/modtrezorcrypto/modtrezorcrypto-ripemd160.h @extmod/modtrezorcrypto/modtrezorcrypto-ripemd160.h
####trezor.crypto.hashlib.sha256
@extmod/modtrezorcrypto/modtrezorcrypto-sha256.h @extmod/modtrezorcrypto/modtrezorcrypto-sha256.h
####trezor.crypto.hashlib.sha512
@extmod/modtrezorcrypto/modtrezorcrypto-sha512.h @extmod/modtrezorcrypto/modtrezorcrypto-sha512.h
####trezor.crypto.hashlib.sha3_256
@extmod/modtrezorcrypto/modtrezorcrypto-sha3-256.h @extmod/modtrezorcrypto/modtrezorcrypto-sha3-256.h
####trezor.crypto.hashlib.sha3_512
@extmod/modtrezorcrypto/modtrezorcrypto-sha3-512.h @extmod/modtrezorcrypto/modtrezorcrypto-sha3-512.h
###trezor.crypto.hmac ###trezor.crypto.hmac