marearts-crystal 0.0.316016__cp310-cp310-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 @@
1
+ from .ma_crystal import ma_crystal
File without changes
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.2
2
+ Name: marearts-crystal
3
+ Version: 0.0.316016
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
+ Classifier: Programming Language :: Python :: 3.9
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: <3.12,>=3.9
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: cffi==1.16.0
17
+ Requires-Dist: cryptography==43.0.0
18
+ Requires-Dist: pycparser==2.22
19
+
20
+ # MareArts Crystal
21
+
22
+ 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.
23
+
24
+ ## Installation
25
+
26
+ Install MareArts Crystal using pip:
27
+
28
+ ```bash
29
+ pip install marearts-crystal
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ Here's a comprehensive guide on how to use MareArts Crystal:
35
+
36
+ ```python
37
+ from marearts_crystal import ma_crystal
38
+
39
+ # Initialize with a secret key
40
+ secret_key = "your_secret_key_here"
41
+ skm = ma_crystal(secret_key)
42
+
43
+ # Generate a serial key
44
+ username = "john_doe"
45
+ start_date = "2023-07-01"
46
+ end_date = "2023-12-31"
47
+ serial_key = skm.generate_serial_key(username, start_date, end_date)
48
+ print(f"Generated Serial Key: {serial_key}")
49
+
50
+ # Validate the serial key
51
+ validated_start, validated_end = skm.validate_serial_key(username, serial_key)
52
+ print(f"Validated Start Date: {validated_start}")
53
+ print(f"Validated End Date: {validated_end}")
54
+
55
+ # Date validation
56
+ if skm.validate_date("2024-07-01", "2024-12-31"):
57
+ print("Date range is valid")
58
+ else:
59
+ print("Date range is invalid")
60
+
61
+ # Get today's date
62
+ print("Today's date:", skm.get_today_date())
63
+
64
+ # Generate end dates
65
+ print("Tomorrow:", skm.generate_end_date(0, 0, 1))
66
+ print("Next month:", skm.generate_end_date(0, 1, 0))
67
+ print("Next year:", skm.generate_end_date(1, 0, 0))
68
+
69
+ # Try with an invalid key
70
+ invalid_result = skm.validate_serial_key(username, "invalid_key")
71
+ print(f"Invalid Key Result: {invalid_result}")
72
+
73
+ invalid_result = skm.validate_serial_key("wrong_name", serial_key)
74
+ print(f"Invalid Key Result: {invalid_result}")
75
+
76
+ # String encryption and decryption
77
+ original_string = "Hello, MareArts Crystal!"
78
+ encrypted = skm.encrypt_string(original_string)
79
+ print(f"Encrypted: {encrypted}")
80
+
81
+ decrypted = skm.decrypt_string(encrypted)
82
+ print(f"Decrypted: {decrypted}")
83
+
84
+ # Decryption with wrong key
85
+ wrong_key = "wrong_secret_key"
86
+ wrong_skm = ma_crystal(wrong_key)
87
+ wrong_decryption = wrong_skm.decrypt_string(encrypted)
88
+ print(f"Decryption with wrong key: {wrong_decryption}")
89
+
90
+ # File encryption and decryption
91
+ input_filename = "example.bin" # This can be any file, binary or text
92
+ output_encrypted_filename = "example_encrypted.bin"
93
+
94
+ # Read and encrypt the file
95
+ with open(input_filename, "rb") as file:
96
+ file_content = file.read()
97
+ encrypted_content = skm.encrypt_data(file_content)
98
+
99
+ # Save the encrypted content
100
+ with open(output_encrypted_filename, "wb") as file:
101
+ file.write(encrypted_content)
102
+ print(f"File '{input_filename}' has been encrypted and saved as '{output_encrypted_filename}'")
103
+
104
+ # Decrypt the file
105
+ input_encrypted_filename = output_encrypted_filename
106
+ output_decrypted_filename = "example_decrypted.bin"
107
+
108
+ # Read and decrypt the file
109
+ with open(input_encrypted_filename, "rb") as file:
110
+ encrypted_content = file.read()
111
+ decrypted_content = skm.decrypt_data(encrypted_content)
112
+
113
+ if decrypted_content:
114
+ # Save the decrypted content
115
+ with open(output_decrypted_filename, "wb") as file:
116
+ file.write(decrypted_content)
117
+ print(f"File '{input_encrypted_filename}' has been decrypted and saved as '{output_decrypted_filename}'")
118
+ else:
119
+ print("Decryption failed. The file might be corrupted or the wrong key was used.")
120
+ ```
121
+
122
+ ## Features
123
+
124
+ - Serial key generation and validation
125
+ - Date validation and manipulation
126
+ - String encryption and decryption
127
+ - File encryption and decryption
128
+ - Secure key management
129
+
130
+ ## License
131
+
132
+ This project is licensed under the MIT License
133
+
134
+
135
+ ## Support
136
+
137
+ www.marearts.com
@@ -0,0 +1,7 @@
1
+ marearts_crystal/__init__.py,sha256=VtyfnD_IJ_ZeQ0RSpcUBRpqblBIIER_-SrEsAJyoMfU,34
2
+ marearts_crystal/ma_crystal.cpython-310-aarch64-linux-gnu.so,sha256=Z4LuQeBIG8GSfAqtDTbC6dle0gnu2XJeuq2A8LlVRj8,1051280
3
+ marearts_crystal-0.0.316016.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ marearts_crystal-0.0.316016.dist-info/METADATA,sha256=JtIUdj6IIsk6oV36Z4JqrTYd1cE65rymTbIMHmUjmlo,4183
5
+ marearts_crystal-0.0.316016.dist-info/WHEEL,sha256=BSKYej-YGvazDe9B8zoUFZWiky5VG7550Gs3EkPKdUs,105
6
+ marearts_crystal-0.0.316016.dist-info/top_level.txt,sha256=N9PKpzxPIIZdhvSjlhuEl1yqenIsFaCE2HIs77WPdHI,17
7
+ marearts_crystal-0.0.316016.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.8.2)
3
+ Root-Is-Purelib: false
4
+ Tag: cp310-cp310-linux_aarch64
5
+
@@ -0,0 +1 @@
1
+ marearts_crystal