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