duniterpy package

Submodules

duniterpy.constants module

duniterpy.helpers module

duniterpy.helpers.convert_seed_to_seedhex(seed: bytes) → str

Convert seed to seedhex

Parameters:seed – seed
Rtype str:
duniterpy.helpers.convert_seedhex_to_seed(seedhex: str) → bytes

Convert seedhex to seed

Parameters:seedhex – seed coded in hexadecimal base
Rtype bytes:
duniterpy.helpers.ensure_bytes(data: Union[str, bytes]) → bytes

Convert data in bytes if data is a string

Parameters:data – Data
Rtype bytes:
duniterpy.helpers.ensure_str(data: Union[str, bytes]) → str

Convert data in str if data are bytes

Parameters:data – Data
Rtype str:
duniterpy.helpers.xor_bytes(b1: bytes, b2: bytes) → bytearray

Apply XOR operation on two bytes arguments

Parameters:
  • b1 – First bytes argument
  • b2 – Second bytes argument
Rtype bytearray:
 

Module contents