* fix: inverted loop condition in chaos_machine.py prevents execution
The while loop condition was inverted — it
should be . The loop that pulls output
data and prompts the user for exit never executed.
Also:
- Add type hints to all functions
- Add module-level docstring with references
- Add docstrings with doctests to pull()
- Fix reset() to copy K instead of aliasing it (prevented repeated reset)
- Remove deprecated in favor of built-in
* Apply batched suggestions from code review
Co-authored-by: Christian Clauss <cclauss@me.com>
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add joaat function for non-cryptographic hashing
Implement the Jenkins-One-At-A-Time hash function.
* Add doctest for joaat function
Added doctest examples for the joaat function and included a main block to run tests.
* Refactor joaat function variable names for prevent shadowing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Rename function to jenkins_one_at_a_time
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* feat: add CRC32 hash algorithm implementation
- Implement CRC32 with IEEE 802.3 polynomial
- Add 17 comprehensive doctests with edge cases
- Include validation against zlib.crc32()
- Full type hints and English documentation
- Passes ruff and mypy checks
CRC32 is widely used in ZIP, Ethernet, PNG for data integrity.
This adds an important non-cryptographic hash algorithm
that was missing from the repository.
* updating DIRECTORY.md
---------
Co-authored-by: rodrigo.nogueira <rodrigo.nogueira@prf.gov.br>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
2026-09-21 23:46:33 +02:00
Gabrielly de S. Pinto Dantaspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Clausspre-commit-ci[bot] <pre-commit-ci[bot]@users.noreply.github.com>
* add tests for enigma_machine
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* typo
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <pre-commit-ci[bot]@users.noreply.github.com>
* Add files via upload
* Update fletcher16.py
* Update fletcher16.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update fletcher16.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update fletcher16.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update fletcher16.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add type hints to md5.py
* Rename some vars to snake case
* Specify functions imported from math
* Rename vars and functions to be more descriptive
* Make tests from test function into doctests
* Clarify more var names
* Refactor some MD5 code into preprocess function
* Simplify loop indices in get_block_words
* Add more detailed comments, docs, and doctests
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* Add type hints to md5.py
* Rename some vars to snake case
* Specify functions imported from math
* Rename vars and functions to be more descriptive
* Make tests from test function into doctests
* Clarify more var names
* Refactor some MD5 code into preprocess function
* Simplify loop indices in get_block_words
* Add more detailed comments, docs, and doctests
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* Convert str types to bytes
* Add tests comparing md5_me to hashlib's md5
* Replace line-break backslashes with parentheses
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added Readme file to document the hashing algorithm.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Adding ELFHash Algorithm
Adding a new Hash Algorithm.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update elf.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update elf.py
* Update elf.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update elf.py
* Apply suggestions from code review
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* MAINT: Used f-string method
Updated the code with f-string methods wherever required for a better and cleaner understanding of the code.
* Updated files with f-string method
* Update rsa_key_generator.py
* Update rsa_key_generator.py
* Update elgamal_key_generator.py
* Update lru_cache.py
I don't think this change is efficient but it might tackle the error as the error was due to using long character lines.
* Update lru_cache.py
* Update lru_cache.py
Co-authored-by: cyai <seriesscar@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* The black formatter is no longer beta
* pre-commit autoupdate
* pre-commit autoupdate
* Remove project_euler/problem_145 which is killing our CI tests
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* luhn.py: Favor list comprehensions over maps
As discussed in CONTRIBUTING.md.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Luhn algorithm
Perform Luhn validation on input string
Algorithm:
* Double every other digit starting from 2nd last digit.
* Subtract 9 if number is greater than 9.
* Sum the numbers
https://en.wikipedia.org/wiki/Luhn_algorithm
* Update DIRECTORY.md
* Update luhn.py
* Update luhn.py
* Update luhn.py
* Update luhn.py
* Update DIRECTORY.md
* fix hashes-folder
* Update build.yml
* fix doctests
* return-values to int
* Update hashes/adler32.py
* type hints for elements
Co-authored-by: Christian Clauss <cclauss@me.com>