-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
132 lines (90 loc) · 3.14 KB
/
setup.py
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
from setuptools import setup
long_description = """
<div align="center">
# **Secrypto**
**Secrypto** is an excellent cryptographer, with more than $4.5e806$ (**45 with 805 following zeros!**) possible combinations.
---
<br><br>
# **Contents**
</div>
* [**`How To Use`**](#how-to-use)
* [**`License`**](#license)
* [**`Contributing`**](#contributing)
* [**`Code Of Conduct`**](#code-of-conduct)
* [**`Security`**](#security)
<br><br>
<div align="center">
# **How To Use**
</div>
### **Create a Key**
```python
from Secrypto import Key
key = Key()
```
`Key` can have the following parameters:
- `alterations` (**optional**) (default -> *3*) - This defines the number of alterations for each character.
- `seed` (**optional**) (default -> *None*) - This defines the random seed at which the key will be made
You can also get the `seed` at which the Key is made and the `key` itself.
To get the `key` and the `seed` from the `Key` you can write:
```python
from Secrypto import Key
key = Key()
print(key.key)
print(key.seed)
```
### Encryption and Decryption
When you have the key, it is pretty simple to **encrypt** and **decrypt**.
```python
from Secrypto import Key, encrypt, decrypt
key = Key()
text = "Hello, World"
encryption = encrypt(
text,
key
)
print(encryption)
decryption = decrypt(
encryption,
key #the same key should be used.
)
print(decryption)
if text == decryption:
print("success!")
```
<br><br>
<div align="center">
# [**License**](https://creativecommons.org/publicdomain/zero/1.0/legalcode.en "CC0 1.0 Universal Website")
</div>
Secrypto is licensed under the [**CC0 1.0 Universal License**](https://github.com/aahan0511/Secrypto/blob/main/LICENSE.md "License for Secrypto").
<br><br>
<div align="center">
# [**Contributing**](https://github.com/aahan0511/Secrypto/blob/main/.github/CONTRIBUTING.md "Contributing on Secrypto")
</div>
Follow the [CONTRIBUTING.md](https://github.com/aahan0511/Secrypto/blob/main/.github/CONTRIBUTING.md "Contributing for Secrypto") to ensure a smooth contribution process.
<br><br>
<div align="center">
# [**Code Of Conduct**](https://www.contributor-covenant.org/ "Contributor Covenant Website")
</div>
Secrypto has the [**Contributor Covenant Code of Conduct**](https://github.com/aahan0511/Secrypto/blob/main/.github/CODE_OF_CONDUCT.md "Code Of Conduct for Secrypto").
<br><br>
<div align="center">
# [**Security**](https://github.com/aahan0511/Secrypto/blob/main/.github/SECURITY.md "Security on Secrypto")
</div>
To view the security and data safety of Secrypto, see [`SECURITY.md`](https://github.com/aahan0511/SecryptoSecrypto/blob/main/.github/SECURITY.md "Security on Secrypto").
"""
setup(
name='secrypto',
version='1.0.4',
packages=["secrypto", "secrypto.source"],
install_requires=[],
author='Aahan Salecha',
author_email='[email protected]',
description='A powerful encryption and decryption library',
long_description=long_description,
long_description_content_type='text/markdown',
license='CC0 1.0 Universal',
license_file="LICENSE.md",
project_urls={
'Source Repository': 'https://github.com/aahan0511/Secrypto/'
}
)