Python script to calculate LPC firmware checksums
Project description
lpc_checksum
Python script to calculate LPC firmware checksums, based on the C version by Roel Verdult. It can be used as a standalone application, or as a Python module that integrates directly in a build environment (e.g. SCons). It does not need to be compiled.
Requirements
The only requirement is Python 3.9 or newer.
Installation
This module can be installed from Pypi via pip install lpc_checksum
.
Alternatively, you can install the latest version by cloning this repository
and run python setup.py install
.
Usage
There are two ways of using lpc_checksum
.
Standalone
When installed via Pip or from source, the command lpc_checksum
should be
available on your PATH. By default, it assumes the input file is a binary file.
lpc_checksum <firmware.bin|hex> [--format=bin] [--read-only]
Program exits with a non-zero error code when it failed.
As a module
import lpc_checksum
checksum = lpc_checksum.checksum(input_file, [read_only=True])
On error, an exception will be raised.
Tests
To run the tests, please clone this repository and run poetry run pytest
.
Contributing
See the CONTRIBUTING.md
file.
License
See the LICENSE.md
file (MIT license).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for lpc_checksum-3.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dd89baa4ae6c8961335ec8153a56efbd3ddbd286965943490b283774f3f41e6 |
|
MD5 | 8c6a716f44a6e979486312f18989ab1b |
|
BLAKE2b-256 | b0b4f5b9ca73a950e0f32fe8f9ee12ecb970641cb695327147261484642d1692 |