Simple encryption library (XOR, Caesar)
Project description
BasitCrypto
مكتبة تشفير بسيطة بلغة بايثون تدعم طريقتي التشفير XOR و شيفرة قيصر.
Installation
pip install basitcrypto
التثبيت محليًا
إذا كنت تريد تثبيت المكتبة محليًا نفذ الأمر التالي:
pip install dist/basitcrypto-0.1.0-py3-none-any.whl
تأكد من تنفيذ الأمر من المجلد الرئيسي للمشروع حيث يوجد مجلد dist/.
كيفية الاستخدام
قم باستيراد دوال التشفير وفك التشفير واستخدمها كما في المثال التالي:
from basitcrypto import encrypt_xor, decrypt_xor, encrypt_caesar, decrypt_caesar
# تجربة تشفير XOR
text = "فلسطين حرة"
key = "scret"
encrypted_xor = encrypt_xor(text, key)
decrypted_xor = decrypt_xor(encrypted_xor, key)
print("تشفير XOR:")
print("النص المشفر:", encrypted_xor)
print("النص المفكك:", decrypted_xor)
print()
# تجربة تشفير قيصر
shift = 3
encrypted_caesar = encrypt_caesar(text, shift)
decrypted_caesar = decrypt_caesar(encrypted_caesar, shift)
print("تشفير قيصر:")
print("النص المشفر:", encrypted_caesar)
print("النص المفكك:", decrypted_caesar)
ماذا تفعل المكتبة؟
- تشفير XOR: تقوم بتشفير النص عبر تطبيق عملية XOR بين حروف النص والمفتاح السري.
- شيفرة قيصر: تقوم بتشفير النص عبر تحريك كل حرف بمقدار ثابت ضمن الأبجدية.
ملاحظات هامة
- تأكد من أن المفتاح في تشفير XOR لا يكون فارغًا.
- تشفير قيصر مناسب للنصوص التي تحتوي على أحرف أبجدية فقط.
مع تحيات المطور : حسام الجنيد
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
basitcrypto-0.2.0.tar.gz
(2.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file basitcrypto-0.2.0.tar.gz.
File metadata
- Download URL: basitcrypto-0.2.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07ff7eed6dfa3895d7b51035ebce5fa1061476e995790012a575f01581d71e8d
|
|
| MD5 |
fa75dfea5927177daa6e426f5182d189
|
|
| BLAKE2b-256 |
023bcf59a35665ffd25951e6559d27aa36e9503d219efea5fad096c556a94ef9
|
File details
Details for the file basitcrypto-0.2.0-py3-none-any.whl.
File metadata
- Download URL: basitcrypto-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55aaf3686250e8909b28102e2305508bde1bd735fbe29ffb092f0a1e84d16d4d
|
|
| MD5 |
0773572738363a31e474cc869abccafe
|
|
| BLAKE2b-256 |
ad389e3e1d739a792c346b1d5d5e065a42412768e09e564077a18611c6ce5f06
|