Skip to main content

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.

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)

Source distribution for rot-codec 0.1.3
File Size Uploaded
rot_codec-0.1.3.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rot-codec 0.1.3
File Interpreter ABI Platform
rot_codec-0.1.3-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page