rot-codec
rot5, rot13, rot18, rot47 codecs.
ROT5、ROT13、ROT18、ROT47 编码是一种简单的码元位置顺序替换暗码。此类编码具有可逆性,可以自我解密,主要用于应对快速浏览,或者是机器的读取,而不让其理解其意。
ROT5 是 rotate by 5 places 的简写,意思是旋转5个位置,其它皆同。下面分别说说它们的编码方式。
ROT5:只对数字进行编码,用当前数字往前数的第5个数字替换当前数字,例如当前为0,编码后变成5,当前为1,编码后变成6,以此类推顺序循环。
ROT13:只对字母进行编码,用当前字母往前数的第13个字母替换当前字母,例如当前为A,编码后变成N,当前为B,编码后变成O,以此类推顺序循环。
ROT18:这是一个异类,本来没有,它是将ROT5和ROT13组合在一起,为了好称呼,将其命名为ROT18。
ROT47:对数字、字母、常用符号进行编码,按照它们的ASCII值进行位置替换,用当前字符ASCII值往前数的第47位对应字符替换当前字符,例如当前为小写字母z,编码后变成大写字母K,当前为数字0,编码后变成符号_。用于ROT47编码的字符其ASCII值范围是33-126,具体可参考ASCII编码。
Install
pip install rot-codec
Install Commands
- rot-codec
Register To System Codecs
- rot5
- rot13 # override the system default rot13
- rot18
- rot47
rot-codec Command Line Tool
Command Help
E:\rot-codec>rot-codec --help
Usage: rot-codec [OPTIONS] [MESSAGE]
ROT5、ROT13、ROT18、ROT47
编码是一种简单的码元位置顺序替换暗码。此类编码具有可逆性,可以自我解密,主要用于应对快速浏览,或者是机器的读取,而不让其理解其意。
ROT5 是 rotate by 5 places 的简写,意思是旋转5个位置,其它皆同。下面分别说说它们的编码方式。
ROT5:只对数字进行编码,用当前数字往前数的第5个数字替换当前数字,例如当前为0,编码后变成5,当前为1,编码后变成6,以此类推顺序循环。
ROT13:只对字母进行编码,用当前字母往前数的第13个字母替换当前字母,例如当前为A,编码后变成N,当前为B,编码后变成O,以此类推顺序循环。
ROT18:这是一个异类,本来没有,它是将ROT5和ROT13组合在一起,为了好称呼,将其命名为ROT18。
ROT47:对数字、字母、常用符号进行编码,按照它们的ASCII值进行位置替换,用当前字符ASCII值往前数的第47位对应字符替换当前字符,例如当前
为小写字母z,编码后变成大写字母K,当前为数字0,编码后变成符号_。用于ROT47编码的字符其ASCII值范围是33-126,具体可参考ASCII编
码。
备注:MESSAGE为提供时,则从STDIN中读取。
Options:
-m, --method [rot5|rot13|rot18|rot47]
-d, --decode
-e, --encoding TEXT Message encoding.
--help Show this message and exit.
Usage
E:\rot-codec>rot-codec hello
uryyb
E:\rot-codec>rot-codec -d uryyb
hello
Releases
v0.1.3
- Doc update.
Metadata
Release files for rot-codec 0.1.3
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 |
|---|---|---|---|---|
| rot_codec-0.1.3.tar.gz | 4.9 kB | Without provenance | Details for rot_codec-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rot_codec-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for rot_codec-0.1.3-py3-none-any.whl |
Total release size: 9.9 kB
Release files / rot_codec-0.1.3.tar.gz
| Download URL | rot_codec-0.1.3.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23fb7fd83b2d0aac8be520a93300f1607a1b6f6ae2f1b70343d64930e8b2da5d
|
|
BLAKE2b-256 checksum How to use checksums |
c2dc9bdd94d57e0c93e3761e67191e3fd5321fd71d768a55c936bf65d0b48da3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|
Release files / rot_codec-0.1.3-py3-none-any.whl
| Download URL | rot_codec-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc3005598d0015d55c575b4af7923e1a54d859d8c48fe58a5a65f2226833bf58
|
|
BLAKE2b-256 checksum How to use checksums |
3c031fe7f275660d98b636aa7d6a39823a526273ddc2223b08e38edc2e73ce9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|
Security for rot-codec 0.1.3
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.