1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-18 11:21:11 +00:00

docs(core): improve documentation of crc32 function

[no changelog]
This commit is contained in:
M1nd3r 2024-05-30 11:55:56 +02:00 committed by Petr Sedláček
parent 5c6af8332a
commit 1d747d3b7f
2 changed files with 20 additions and 6 deletions

View File

@ -28,6 +28,14 @@
/// def crc32(data: bytes, crc: int = 0) -> int:
/// """
/// Computes a CRC32 checksum of `data`.
///
/// Args:
/// `data` (`bytes`): Input data.
/// `crc` (`int`, `optional`): Initial CRC value for chaining
/// computations over multiple data segments. Defaults to 0.
///
/// Returns:
/// `int`: Computed CRC32 checksum.
/// """
mp_obj_t mod_trezorcrypto_crc_crc32(size_t n_args, const mp_obj_t *args) {
mp_buffer_info_t bufinfo = {0};

View File

@ -5,4 +5,10 @@ from typing import *
def crc32(data: bytes, crc: int = 0) -> int:
"""
Computes a CRC32 checksum of `data`.
Args:
`data` (`bytes`): Input data.
`crc` (`int`, `optional`): Initial CRC value for chaining
computations over multiple data segments. Defaults to 0.
Returns:
`int`: Computed CRC32 checksum.
"""