python_modhex
When working with yubikeys, you get OTPs in modhex, which according to https://developers.yubico.com/OTP/Modhex_Converter.html
is similar to hex encoding but with a different encoding alphabet.
The alphabet is ALPHABET = "cbdefghijklnrtuv".
This module merely does what https://developers.yubico.com/OTP/Modhex_Converter.html offers as well:
- Convert a
modhexstring tohex. - Convert a
hexstring tomodhex.
Installation
pip install python_modhex
The installation also creates an executable, thatprovidesa simple interfaces:
python_modhex --version
python_modhex --help
# From modhex.
python_modhex from-modhex cccccctcjhhrrrdeejrtrvdldhthenggvuedgfevjecu <list_of_modhex_strings>
# To modhex.
python_modhex to-modhex 000000d0866ccc2338cdcf2a26d63b55fe32543f830e <list_of_hex_strings>
Use as module
>>> from python_modhex.python_modhex import from_modhex, to_modhex
>>> modhex = "cccccccgklgcvnkcvnnegrnhgrjkhlkfhdkclfncvlgj"
>>> hex_ = "000000059a50fb90fbb35cb65c896a946290a4b0fa58
>>>
>>> from_modhex(modhex)
>>> 000000059a50fb90fbb35cb65c896a946290a4b0fa58
>>>
>>> to_modhex(hex_)
>>> cccccccgklgcvnkcvnnegrnhgrjkhlkfhdkclfncvlgj
Metadata
Release files for python-modhex 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_modhex-0.0.2.tar.gz | 3.0 kB | Without provenance | Details for python_modhex-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_modhex-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for python_modhex-0.0.2-py3-none-any.whl |
Total release size: 6.9 kB
Release files / python_modhex-0.0.2.tar.gz
| Download URL | python_modhex-0.0.2.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd3453939b39fed362036b66601ece52bd35a6228de350f654309199edb2c1eb
|
|
BLAKE2b-256 checksum How to use checksums |
2558be17667bd318d8d7b798918916b97a58a35498d072c67ace3867dabc6bf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.8
|
Release files / python_modhex-0.0.2-py3-none-any.whl
| Download URL | python_modhex-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a87e6497919317c86241616bfc2ac3770668bf57cd8d6a1f92e7cb8e61790ae
|
|
BLAKE2b-256 checksum How to use checksums |
fa7e2cd740f36d591d077882ca10f92de6804c9490086b5ca3c4cd290cc46c49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.8
|
Security for python-modhex 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.