How delta203/hashfunction works
Hashfunction is a small Python hashing tool: users can hash a string directly or use the command-line modes to generate hash files and check for duplicate hashes. The core algorithm and CLI are in the two sampled source files. The README documents the algorithm stages and CLI capabilities; relationships for those workflows are based on the sampled launcher and hash implementation.
Main entry points: hashfunction.py Hash API · launcher.py CLI dispatcher
Components 17
CLI workflows
- CLI dispatcher
launcher.py - Direct hash
launcher.py - List hashing
launcher.py - Range hashing
launcher.py - Hash chaining
launcher.py - Collision check
launcher.py
Hash algorithm
- Hash API
hashfunction.py - Bit preparation
hashfunction.py - Block splitting
hashfunction.py - Modulus blocks
hashfunction.py - XOR combination
hashfunction.py - Bit compression
hashfunction.py - Hex conversion
hashfunction.py
File operations
- Input file
- Hash file
- Hashes to check
Other components
- User
Connections 24
- User → CLI dispatcher: runs command
- CLI dispatcher → Direct hash: dispatches
- CLI dispatcher → List hashing: dispatches
- CLI dispatcher → Range hashing: dispatches
- CLI dispatcher → Hash chaining: dispatches
- CLI dispatcher → Collision check: dispatches
- Direct hash → Hash API: hashes input
- List hashing → Input file: reads words
- List hashing → Hash API: hashes words
- List hashing → Hash file: appends hashes
- Range hashing → Hash API: hashes strings
- Range hashing → Hash file: appends hashes
- Hash chaining → Hash API: rehashes output
- Hash chaining → Hash file: appends hashes
- Collision check → Hashes to check: reads hashes
- Direct hash → Hash API: requests hash
- Hash API → Bit preparation: calls
- Bit preparation → Block splitting: prepares bits
- Block splitting → Modulus blocks: derives blocks
- Block splitting → XOR combination: provides blocks
- Modulus blocks → XOR combination: provides modulus blocks
- XOR combination → Bit compression: reduces bits
- Bit compression → Hex conversion: converts result
- Hex conversion → Hash API: returns hash