https://github.com/stestagg/odhash
https://github.com/stestagg/odhash
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/stestagg/odhash
- Owner: stestagg
- Created: 2026-03-20T11:50:04.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-20T11:50:06.000Z (4 months ago)
- Last Synced: 2026-04-28T01:16:56.777Z (3 months ago)
- Language: Jupyter Notebook
- Size: 601 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# odhash
Turn any string or bytes into a short, memorable sequence of English words.
```python
import odhash
odhash.hash("hello")
# 'quarantine-cycle-knoll-meatloaf'
odhash.hash("hello", words=2)
# 'quarantine-cycle'
```
## Install
```
pip install odhash
```
## Usage
```python
odhash.hash(inp, algo=hashlib.sha256, words=4) -> str
```
- `inp` — a `str`, `bytes`, or an already-constructed `hashlib` hash object
- `algo` — any `hashlib`-compatible hash constructor (default: `sha256`)
- `words` — number of words in the output (default: 4)
Each word is selected from a curated list of 16,384 common English words using 2 bytes of the digest.
## License
MIT