pinkhash


Namepinkhash JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryConvert any hash/data into human-friendly phrase (numerous ways)
upload_time2024-10-13 16:04:38
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords icao nato rfc1751 alphabet convert elephant hash memorize mnemonic pink pinkelephant pinkhash words
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pink Hash

*It's like a pink elephant, but a hash*

Convert hashes to mnemonic phrases.

Hashes are great for many machine-specific purposes, but if you give a hash to a person (e.g., display it on a console), you're doing something wrong. Humans struggle with remembering, comparing, or typing hashes accurately. For most people, `8f776debaf8b5031643aa463ba5bf0dc` and `8f776debaf8b5013643aa463ba5bf0dc` look essentially the same.

However, humans aren’t entirely useless — they can remember vivid phrases quite well. If you tell someone not to think about a pink elephant or a white monkey, and then Margot Robbie calls to ask them out on a date, even after spending the entire evening and night with her, they’ll still be thinking about the pink elephant.

`WELL LANE HELD` or `Uniform Xray November` is much easier for numan to remember.


## Examples
~~~shell
$ echo -n pinkhash | md5sum
8f776debaf8b5031643aa463ba5bf0dc  -

$ echo -n pinkhash | pink -a nato
Uniform Xray November

$ echo -n pinkhash | pink
WELL LANE HELD
~~~

## Installation

recommended way (you may want to `apt install pipx` for this):
~~~
pipx install pinkhash
~~~

or older way:
~~~
pip install pinkhash
~~~

## CLI Usage
~~~shell
# get pink hash for any file as stdin stream
$ pink < /tmp/1M

# get 5-words pink hash with NATO alphabet
$ pink -a nato -w 5 < /tmp/1M 
Hotel Yankee Zulu Papa Hotel

# eng1 never returns more then 2 words
$ pink -a eng1  < /tmp/1M 
paraboloidal teapot
~~~

## Python usage

Get pinkhash for a `str` with all default settings (RFC1751 alphabet).
~~~python
from pinkhash import PinkHash
pink = PinkHash()
print(pink.convert('Hello world!'))
~~~

~~~python
from pinkhash import PinkHash
import sys

pink = PinkHash(alphabet_name='nato', nwords=3)
data = sys.stdin.buffer.read()
r = pink.convert(data)
print(r)
~~~


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pinkhash",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ICAO, NATO, RFC1751, alphabet, convert, elephant, hash, memorize, mnemonic, pink, pinkelephant, pinkhash, words",
    "author": null,
    "author_email": "Yaroslav Polyakov <yaroslaff@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/70/bb/43b2dea2fc32cf4c3ab804751f4eaae067eac335d6ec923db80b71abcc34/pinkhash-0.0.1.tar.gz",
    "platform": null,
    "description": "# Pink Hash\n\n*It's like a pink elephant, but a hash*\n\nConvert hashes to mnemonic phrases.\n\nHashes are great for many machine-specific purposes, but if you give a hash to a person (e.g., display it on a console), you're doing something wrong. Humans struggle with remembering, comparing, or typing hashes accurately. For most people, `8f776debaf8b5031643aa463ba5bf0dc` and `8f776debaf8b5013643aa463ba5bf0dc` look essentially the same.\n\nHowever, humans aren\u2019t entirely useless \u2014 they can remember vivid phrases quite well. If you tell someone not to think about a pink elephant or a white monkey, and then Margot Robbie calls to ask them out on a date, even after spending the entire evening and night with her, they\u2019ll still be thinking about the pink elephant.\n\n`WELL LANE HELD` or `Uniform Xray November` is much easier for numan to remember.\n\n\n## Examples\n~~~shell\n$ echo -n pinkhash | md5sum\n8f776debaf8b5031643aa463ba5bf0dc  -\n\n$ echo -n pinkhash | pink -a nato\nUniform Xray November\n\n$ echo -n pinkhash | pink\nWELL LANE HELD\n~~~\n\n## Installation\n\nrecommended way (you may want to `apt install pipx` for this):\n~~~\npipx install pinkhash\n~~~\n\nor older way:\n~~~\npip install pinkhash\n~~~\n\n## CLI Usage\n~~~shell\n# get pink hash for any file as stdin stream\n$ pink < /tmp/1M\n\n# get 5-words pink hash with NATO alphabet\n$ pink -a nato -w 5 < /tmp/1M \nHotel Yankee Zulu Papa Hotel\n\n# eng1 never returns more then 2 words\n$ pink -a eng1  < /tmp/1M \nparaboloidal teapot\n~~~\n\n## Python usage\n\nGet pinkhash for a `str` with all default settings (RFC1751 alphabet).\n~~~python\nfrom pinkhash import PinkHash\npink = PinkHash()\nprint(pink.convert('Hello world!'))\n~~~\n\n~~~python\nfrom pinkhash import PinkHash\nimport sys\n\npink = PinkHash(alphabet_name='nato', nwords=3)\ndata = sys.stdin.buffer.read()\nr = pink.convert(data)\nprint(r)\n~~~\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Convert any hash/data into human-friendly phrase (numerous ways)",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/yaroslaff/pinkhash",
        "Issues": "https://github.com/yaroslaff/pinkhash/issues"
    },
    "split_keywords": [
        "icao",
        " nato",
        " rfc1751",
        " alphabet",
        " convert",
        " elephant",
        " hash",
        " memorize",
        " mnemonic",
        " pink",
        " pinkelephant",
        " pinkhash",
        " words"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ab846f1c610d9033a09154de8575810794de4661faf1e5c36c7af2de5b254eb5",
                "md5": "353cd3e6b0db86dec807cab19f188e1e",
                "sha256": "111fd699dc5825412fc678c0eaae82c24b05c200886f31fd399b79da00221e43"
            },
            "downloads": -1,
            "filename": "pinkhash-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "353cd3e6b0db86dec807cab19f188e1e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 253982,
            "upload_time": "2024-10-13T16:04:42",
            "upload_time_iso_8601": "2024-10-13T16:04:42.506387Z",
            "url": "https://files.pythonhosted.org/packages/ab/84/6f1c610d9033a09154de8575810794de4661faf1e5c36c7af2de5b254eb5/pinkhash-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "70bb43b2dea2fc32cf4c3ab804751f4eaae067eac335d6ec923db80b71abcc34",
                "md5": "5a9efd799149a97cd2b5ce854ca28761",
                "sha256": "ddf74c36392c07ae8e4916ebff1dbbf722e878398c26834451d06636c6123454"
            },
            "downloads": -1,
            "filename": "pinkhash-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5a9efd799149a97cd2b5ce854ca28761",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 252224,
            "upload_time": "2024-10-13T16:04:38",
            "upload_time_iso_8601": "2024-10-13T16:04:38.731420Z",
            "url": "https://files.pythonhosted.org/packages/70/bb/43b2dea2fc32cf4c3ab804751f4eaae067eac335d6ec923db80b71abcc34/pinkhash-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-13 16:04:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yaroslaff",
    "github_project": "pinkhash",
    "github_not_found": true,
    "lcname": "pinkhash"
}
        
Elapsed time: 0.53162s