-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKG-INFO
161 lines (121 loc) · 5.3 KB
/
PKG-INFO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Metadata-Version: 2.1
Name: RC4Encryption
Version: 0.0.2
Summary: This package implements RC4 encryption.
Home-page: https://github.com/mauricelambert/RC4Encryption
Author: Maurice Lambert
Author-email: mauricelambert434@gmail.com
Maintainer: Maurice Lambert
Maintainer-email: mauricelambert434@gmail.com
License: GPL-3.0 License
Project-URL: Documentation, https://mauricelambert.github.io/info/python/security/RC4Encryption.html
Project-URL: Executable, https://mauricelambert.github.io/info/python/security/RC4Encryption.pyz
Keywords: RC4,Encryption,Cipher
Platform: Windows
Platform: Linux
Platform: MacOS
Classifier: Programming Language :: Python
Classifier: Development Status :: 5 - Production/Stable
Classifier: Topic :: Security :: Cryptography
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.9
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
![RC4Encryption logo](https://mauricelambert.github.io/info/python/security/RC4Encryption_small.png "RC4Encryption logo")
# RC4Encryption
## Description
This package implements the RC4 encryption.
## Requirements
This package require:
- python3
- python3 Standard Library
## Installation
```bash
pip install RC4Encryption
```
## Usages
### Recommended options
```bash
rc4 [key] -6 -o [secrets.cipher] -i [secrets.file] # encryption
rc4 [key] -n base64 -i [secrets.cipher] -o [decipher.file] -d # decryption
```
### Command line
#### Module
```bash
python3 -m RC4Encryption rc4key -s secrets
```
#### Python executable
```bash
python3 RC4Encryption.pyz rc4key -s secrets
```
#### Command
##### Basic
```bash
rc4 rc4key -s secrets # encrypt "secrets" with rc4key sha256 as key
```
##### Advanced
```bash
rc4 rc4key -s secrets # encrypt "secrets" with rc4key as key
echo secrets| rc4 rc4key --no-sha256 -i # encrypt "secrets\n" with sha256 of rc4key as key
rc4 rc4key -i secrets.txt # encrypt secrets.txt file with rc4key as key
rc4 rc4key -o encrypt.rc4 -s secrets # encrypt "secrets" with rc4key as key and redirect the output to the encrypt.rc4 file
rc4 rc4key -i encrypt.rc4 -d # decrypt encrypt.rc4 with rc4key as key
## INPUT ENCODING
rc4 rc4key -n base64 -s c2VjcmV0cw== # encrypt "secrets" with rc4key sha256 as key ("c2VjcmV0cw==" = base64("secrets"))
## OUTPUT ENCODING
rc4 rc4key -s secrets -8 # encrypt "secrets" with rc4key sha256 as key, base85-encoded output
rc4 rc4key -s secrets -6 # encrypt "secrets" with rc4key sha256 as key, base64-encoded output
rc4 rc4key -s secrets -3 # encrypt "secrets" with rc4key sha256 as key, base30-encoded output
rc4 rc4key -s secrets -1 # encrypt "secrets" with rc4key sha256 as key, base16-encoded output
rc4 rc4key -s secrets -u # encrypt "secrets" with rc4key sha256 as key, uu-encoded output
```
### Python script
```python
from RC4Encryption import RC4Encryption
rc4 = RC4Encryption(b'key')
rc4.make_key()
cipher = rc4.crypt(b'secrets')
cipher_continuation = rc4.crypt(b'secrets')
rc4.reset(b'key')
rc4.make_key()
decipher = rc4.crypt(cipher)
decipher_continuation = rc4.crypt(cipher_continuation)
```
## Links
- [Github Page](https://github.com/mauricelambert/RC4Encryption/)
- [Documentation](https://mauricelambert.github.io/info/python/security/RC4Encryption.html)
- [Pypi package](https://pypi.org/project/RC4Encryption/)
- [Executable](https://mauricelambert.github.io/info/python/security/RC4Encryption.pyz)
## Help
```text
usage: RC4.py [-h] (--input-file [INPUT_FILE] | --input-string INPUT_STRING) [--output-file OUTPUT_FILE]
[--base85 | --base64 | --base32 | --base16 | --output-encoding {base64,base85,base16,base32}]
[--input-encoding {base64,base85,base16,base32}] [--sha256]
key
This file performs RC4 encryption.
positional arguments:
key Encryption key.
options:
-h, --help show this help message and exit
--input-file [INPUT_FILE], --i-file [INPUT_FILE], -i [INPUT_FILE]
The secrets file to be encrypted.
--input-string INPUT_STRING, --string INPUT_STRING, -s INPUT_STRING
The string to be encrypted.
--output-file OUTPUT_FILE, --o-file OUTPUT_FILE, -o OUTPUT_FILE
The output file.
--base85, --85, -8 Base85 encoding as output format
--base64, --64, -6 Base64 encoding as output format
--base32, --32, -3 Base32 encoding as output format
--base16, --16, -1 Base16 encoding as output format
--output-encoding {base64,base85,base16,base32}, --o-encoding {base64,base85,base16,base32}, -e {base64,base85,base16,base32}
Output encoding.
--input-encoding {base64,base85,base16,base32}, --i-encoding {base64,base85,base16,base32}, -n {base64,base85,base16,base32}
Input encoding.
--sha256 Use the sha256 of the key as the key.
```
## Licence
Licensed under the [GPL, version 3](https://www.gnu.org/licenses/).