marearts-crystal 0.0.630.1726__cp311-cp311-manylinux2014_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ __version__ = "0.0.0630.1726"
2
+
3
+ from .ma_crystal import ma_crystal
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.4
2
+ Name: marearts-crystal
3
+ Version: 0.0.630.1726
4
+ Summary: marearts crystal for encryption and decryption
5
+ Home-page: https://www.marearts.com
6
+ Author: MareArts
7
+ Author-email: MareArts <hello@marearts.com>
8
+ License: MIT
9
+ Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Operating System :: OS Independent
14
+ Requires-Python: <3.13,>=3.9
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: cffi==1.16.0
18
+ Requires-Dist: cryptography==43.0.0
19
+ Requires-Dist: pycparser==2.22
20
+ Dynamic: license-file
21
+
22
+ # MareArts Crystal
23
+
24
+ MareArts Crystal is a Python package for encryption, decryption, and serial key management. It provides a simple interface for generating and validating serial keys, encrypting and decrypting strings and files, and performing date-based operations.
25
+
26
+ ## 🌐 Supported Platforms
27
+
28
+ - **Python versions**: 3.9, 3.10, 3.11, 3.12
29
+ - **Linux**: x86_64, aarch64 (manylinux1/manylinux2014)
30
+ - **Windows**: x86, x64
31
+ - **macOS**: x86_64, arm64 (Apple Silicon)
32
+
33
+ ## Installation
34
+
35
+ Install MareArts Crystal using pip:
36
+
37
+ ```bash
38
+ pip install marearts-crystal
39
+ ```
40
+
41
+ ## Usage
42
+
43
+ Here's a comprehensive guide on how to use MareArts Crystal:
44
+
45
+ ```python
46
+ import marearts_crystal
47
+ from marearts_crystal import ma_crystal
48
+
49
+ # Check package version
50
+ print(f"MareArts Crystal version: {marearts_crystal.__version__}")
51
+
52
+ # Initialize with a secret key
53
+ secret_key = "your_secret_key_here"
54
+ skm = ma_crystal(secret_key)
55
+
56
+ # Generate a serial key
57
+ username = "john_doe"
58
+ start_date = "2023-07-01"
59
+ end_date = "2023-12-31"
60
+ serial_key = skm.generate_serial_key(username, start_date, end_date)
61
+ print(f"Generated Serial Key: {serial_key}")
62
+
63
+ # Validate the serial key
64
+ validated_start, validated_end = skm.validate_serial_key(username, serial_key)
65
+ print(f"Validated Start Date: {validated_start}")
66
+ print(f"Validated End Date: {validated_end}")
67
+
68
+ # Date validation
69
+ if skm.validate_date("2024-07-01", "2024-12-31"):
70
+ print("Date range is valid")
71
+ else:
72
+ print("Date range is invalid")
73
+
74
+ # Get today's date
75
+ print("Today's date:", skm.get_today_date())
76
+
77
+ # Generate end dates
78
+ print("Tomorrow:", skm.generate_end_date(0, 0, 1))
79
+ print("Next month:", skm.generate_end_date(0, 1, 0))
80
+ print("Next year:", skm.generate_end_date(1, 0, 0))
81
+
82
+ # Try with an invalid key
83
+ invalid_result = skm.validate_serial_key(username, "invalid_key")
84
+ print(f"Invalid Key Result: {invalid_result}")
85
+
86
+ invalid_result = skm.validate_serial_key("wrong_name", serial_key)
87
+ print(f"Invalid Key Result: {invalid_result}")
88
+
89
+ # String encryption and decryption
90
+ original_string = "Hello, MareArts Crystal!"
91
+ encrypted = skm.encrypt_string(original_string)
92
+ print(f"Encrypted: {encrypted}")
93
+
94
+ decrypted = skm.decrypt_string(encrypted)
95
+ print(f"Decrypted: {decrypted}")
96
+
97
+ # Decryption with wrong key
98
+ wrong_key = "wrong_secret_key"
99
+ wrong_skm = ma_crystal(wrong_key)
100
+ wrong_decryption = wrong_skm.decrypt_string(encrypted)
101
+ print(f"Decryption with wrong key: {wrong_decryption}")
102
+
103
+ # File encryption and decryption
104
+ input_filename = "example.bin" # This can be any file, binary or text
105
+ output_encrypted_filename = "example_encrypted.bin"
106
+
107
+ # Read and encrypt the file
108
+ with open(input_filename, "rb") as file:
109
+ file_content = file.read()
110
+ encrypted_content = skm.encrypt_data(file_content)
111
+
112
+ # Save the encrypted content
113
+ with open(output_encrypted_filename, "wb") as file:
114
+ file.write(encrypted_content)
115
+ print(f"File '{input_filename}' has been encrypted and saved as '{output_encrypted_filename}'")
116
+
117
+ # Decrypt the file
118
+ input_encrypted_filename = output_encrypted_filename
119
+ output_decrypted_filename = "example_decrypted.bin"
120
+
121
+ # Read and decrypt the file
122
+ with open(input_encrypted_filename, "rb") as file:
123
+ encrypted_content = file.read()
124
+ decrypted_content = skm.decrypt_data(encrypted_content)
125
+
126
+ if decrypted_content:
127
+ # Save the decrypted content
128
+ with open(output_decrypted_filename, "wb") as file:
129
+ file.write(decrypted_content)
130
+ print(f"File '{input_encrypted_filename}' has been decrypted and saved as '{output_decrypted_filename}'")
131
+ else:
132
+ print("Decryption failed. The file might be corrupted or the wrong key was used.")
133
+ ```
134
+
135
+ ## Features
136
+
137
+ - Serial key generation and validation
138
+ - Date validation and manipulation
139
+ - String encryption and decryption
140
+ - File encryption and decryption
141
+ - Secure key management
142
+
143
+ ## License
144
+
145
+ This project is licensed under the MIT License
146
+
147
+
148
+
149
+ ## Support
150
+
151
+ www.marearts.com
@@ -0,0 +1,7 @@
1
+ marearts_crystal/__init__.py,sha256=cisifX4jBblIfI9UfmqnrjCVEEWOo1HVzEKP3gVj5Fc,65
2
+ marearts_crystal/ma_crystal.cpython-311-aarch64-linux-gnu.so,sha256=l_QBlJBACDDxm-LQQiQJHFM7KBUn_PoZs537OcZpo_E,1203296
3
+ marearts_crystal-0.0.630.1726.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ marearts_crystal-0.0.630.1726.dist-info/METADATA,sha256=ArZ62lMYO9Fxo2UMwHNQBJRsjSRkpr-hoe5BPRNCfM8,4537
5
+ marearts_crystal-0.0.630.1726.dist-info/WHEEL,sha256=Jb8S1FcKfISaVw1lIq1nUjwRoJcARlRmJgD1nZ0JzgI,105
6
+ marearts_crystal-0.0.630.1726.dist-info/top_level.txt,sha256=N9PKpzxPIIZdhvSjlhuEl1yqenIsFaCE2HIs77WPdHI,17
7
+ marearts_crystal-0.0.630.1726.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp311-cp311-linux_aarch64
5
+
@@ -0,0 +1 @@
1
+ marearts_crystal