sha256bit 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sha256bit-0.2.3 → sha256bit-0.2.4}/.github/workflows/test.yml +3 -4
- {sha256bit-0.2.3 → sha256bit-0.2.4}/.readthedocs.yaml +12 -7
- {sha256bit-0.2.3 → sha256bit-0.2.4}/PKG-INFO +34 -16
- {sha256bit-0.2.3/docs → sha256bit-0.2.4}/Pipfile +5 -2
- sha256bit-0.2.4/Pipfile.lock +707 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/README.md +33 -13
- {sha256bit-0.2.3 → sha256bit-0.2.4}/build +1 -8
- sha256bit-0.2.4/docs/source/installation.rst +40 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/pyproject.toml +2 -2
- {sha256bit-0.2.3 → sha256bit-0.2.4}/sha256bit/cli.py +7 -2
- sha256bit-0.2.3/Pipfile +0 -13
- sha256bit-0.2.3/Pipfile.lock +0 -168
- sha256bit-0.2.3/docs/Pipfile.lock +0 -481
- sha256bit-0.2.3/docs/requirements.txt +0 -36
- sha256bit-0.2.3/docs/source/installation.rst +0 -20
- {sha256bit-0.2.3 → sha256bit-0.2.4}/.github/workflows/build.yml +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/.gitignore +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/LICENSE +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/docs/Makefile +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/docs/make.bat +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/docs/source/api.rst +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/docs/source/conf.py +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/docs/source/examples_python3.rst +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/docs/source/index.rst +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/hatch.toml +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/lint +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/sha256bit/__init__.py +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/sha256bit/utils.py +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/test/SHA224LongMsg.rsp +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/test/SHA224ShortMsg.rsp +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/test/SHA256LongMsg.rsp +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/test/SHA256ShortMsg.rsp +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/test/__init__.py +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/test/test.py +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/test/test_api.py +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/test/test_cavp.py +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/test/test_hardcoded.py +0 -0
- {sha256bit-0.2.3 → sha256bit-0.2.4}/test/test_vs_hashlib.py +0 -0
|
@@ -39,7 +39,6 @@ jobs:
|
|
|
39
39
|
run: |
|
|
40
40
|
python -m pip install --upgrade pip
|
|
41
41
|
python -m pip install hatch build
|
|
42
|
-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
43
42
|
|
|
44
43
|
- if: matrix.python-version == '3.12' && runner.os == 'Linux'
|
|
45
44
|
name: Lint
|
|
@@ -52,6 +51,6 @@ jobs:
|
|
|
52
51
|
- if: matrix.python-version == '3.12' && runner.os == 'Linux'
|
|
53
52
|
name: Doc
|
|
54
53
|
run: |
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
make clean doctest html
|
|
54
|
+
python -m pip install pipenv
|
|
55
|
+
pipenv install --deploy --system --dev
|
|
56
|
+
make -C docs clean doctest html
|
|
@@ -5,6 +5,17 @@
|
|
|
5
5
|
# Required
|
|
6
6
|
version: 2
|
|
7
7
|
|
|
8
|
+
# Dependencies come from the root Pipfile.lock
|
|
9
|
+
build:
|
|
10
|
+
os: ubuntu-24.04
|
|
11
|
+
tools:
|
|
12
|
+
python: "3.12"
|
|
13
|
+
jobs:
|
|
14
|
+
post_create_environment:
|
|
15
|
+
- pip install pipenv
|
|
16
|
+
post_install:
|
|
17
|
+
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH pipenv install --deploy --dev
|
|
18
|
+
|
|
8
19
|
# Build documentation in the docs/ directory with Sphinx
|
|
9
20
|
sphinx:
|
|
10
21
|
configuration: docs/source/conf.py
|
|
@@ -16,10 +27,4 @@ sphinx:
|
|
|
16
27
|
# Optionally build your docs in additional formats such as PDF and ePub
|
|
17
28
|
formats:
|
|
18
29
|
- htmlzip
|
|
19
|
-
- pdf
|
|
20
|
-
|
|
21
|
-
# Optionally set the version of Python and requirements required to build your docs
|
|
22
|
-
python:
|
|
23
|
-
version: 3.12
|
|
24
|
-
install:
|
|
25
|
-
- requirements: docs/requirements.txt
|
|
30
|
+
- pdf
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sha256bit
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: SHA256/SHA224 with bit granularity for message input length
|
|
5
5
|
Project-URL: Homepage, https://github.com/sebastien-riou/sha256bit
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/sebastien-riou/sha256bit/issues
|
|
@@ -10,8 +10,6 @@ Classifier: Development Status :: 4 - Beta
|
|
|
10
10
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.14
|
|
@@ -38,7 +36,28 @@ Pure python implementation of SHA256 and SHA224 with features which are often la
|
|
|
38
36
|
|
|
39
37
|
## Installation
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
### Command line tool
|
|
40
|
+
Install with [pipx](https://pipx.pypa.io), it puts the `sha256bit` command in its own isolated environment:
|
|
41
|
+
|
|
42
|
+
pipx install sha256bit
|
|
43
|
+
|
|
44
|
+
The message is given as a hex string:
|
|
45
|
+
|
|
46
|
+
$ sha256bit 616263
|
|
47
|
+
BA 78 16 BF 8F 01 CF EA 41 41 40 DE 5D AE 22 23 B0 03 61 A3 96 17 7A 9C B4 10 FF 61 F2 00 15 AD
|
|
48
|
+
$ sha256bit --algo sha224 616263
|
|
49
|
+
23 09 7D 22 34 05 D8 22 86 42 A4 77 BD A2 55 B3 2A AD BC E4 BD A0 B3 F7 E3 6C 9D A7
|
|
50
|
+
$ sha256bit --bit-length 1 00
|
|
51
|
+
BD 4F 9E 98 BE B6 8C 6E AD 32 43 B1 B4 C7 FE D7 5F A4 FE AA B1 F8 47 95 CB D8 A9 86 76 A2 A3 75
|
|
52
|
+
|
|
53
|
+
If `pipx` is missing, on Debian/Ubuntu: `sudo apt install pipx && pipx ensurepath`.
|
|
54
|
+
|
|
55
|
+
### Python API
|
|
56
|
+
Add it to your project with [pipenv](https://pipenv.pypa.io):
|
|
57
|
+
|
|
58
|
+
pipenv install sha256bit
|
|
59
|
+
|
|
60
|
+
If `pipenv` is missing: `pipx install pipenv`.
|
|
42
61
|
|
|
43
62
|
## Usage
|
|
44
63
|
|
|
@@ -90,22 +109,20 @@ you can also run each test separately:
|
|
|
90
109
|
|
|
91
110
|
## Generate the doc
|
|
92
111
|
|
|
93
|
-
|
|
94
|
-
pipenv
|
|
95
|
-
|
|
112
|
+
pipenv sync --dev
|
|
113
|
+
pipenv run make -C docs clean doctest html
|
|
114
|
+
|
|
115
|
+
## Update pipenv
|
|
96
116
|
|
|
97
|
-
|
|
117
|
+
The root `Pipfile` holds the tools for building, linting and the doc, all in `[dev-packages]` since the package itself has no dependencies. CI and Read the Docs install the versions pinned in `Pipfile.lock`, so commit it after updating:
|
|
98
118
|
|
|
99
|
-
|
|
100
|
-
pipenv shell
|
|
101
|
-
#use pip to update whatever ou want
|
|
102
|
-
pip freeze > requirements.txt
|
|
103
|
-
pipenv update
|
|
119
|
+
pipenv update --dev
|
|
104
120
|
|
|
105
121
|
## Build the package
|
|
106
|
-
Build is done using `hatchling`.
|
|
122
|
+
Build is done using `hatchling`.
|
|
107
123
|
|
|
108
|
-
|
|
124
|
+
pipenv sync --dev
|
|
125
|
+
pipenv run ./build
|
|
109
126
|
|
|
110
127
|
|
|
111
128
|
## Create a new version
|
|
@@ -114,5 +131,6 @@ Version is managed by `hatch-vcs`, you just need to create a tag in github.
|
|
|
114
131
|
## Launch linters
|
|
115
132
|
They use the configuration from `pyproject.toml`
|
|
116
133
|
|
|
117
|
-
|
|
134
|
+
pipenv sync --dev
|
|
135
|
+
pipenv run ./lint
|
|
118
136
|
|
|
@@ -4,11 +4,14 @@ verify_ssl = true
|
|
|
4
4
|
name = "pypi"
|
|
5
5
|
|
|
6
6
|
[packages]
|
|
7
|
+
|
|
8
|
+
[dev-packages]
|
|
9
|
+
build = "*"
|
|
10
|
+
black = "*"
|
|
11
|
+
ruff = "*"
|
|
7
12
|
sphinx = "*"
|
|
8
13
|
sphinx-rtd-theme = "*"
|
|
9
14
|
sphinx-autodoc-typehints = "*"
|
|
10
15
|
|
|
11
|
-
[dev-packages]
|
|
12
|
-
|
|
13
16
|
[requires]
|
|
14
17
|
python_version = "3.12"
|