# Spidercryptencrypt
Spidercryptencrypt is a Python library for AES (Advanced Encryption Standard) encryption and decryption. It provides functionality to securely encrypt sensitive data before storage or transmission.
## Features
- AES encryption and decryption in CBC (Cipher Block Chaining) mode.
- Uses PKCS7 padding to handle data lengths that are not multiples of the AES block size.
- Integration with `cryptography`, a Python library for modern cryptography.
## Installation
You can install Spidercryptencrypt via `pip`:
```bash
from Spidercryptencrypt import Spidercryptencrypt
import os
# Generate a secure AES key (replace with a secure key management method)
password = b"my_secure_password"
salt = os.urandom(16)
kdf = PBKDF2HMAC(
algorithm=hashes.SHA256(),
length=32,
salt=salt,
iterations=100000,
backend=default_backend()
)
key = kdf.derive(password)
# Initialize Spidercryptencrypt instance with the generated key
crypter = Spidercryptencrypt(key)
# Encrypt a message
plaintext = b"Hello, world!"
encrypted_data = crypter.encrypt(plaintext)
print("Encrypted message:", encrypted_data)
# Decrypt the encrypted message
decrypted_data = crypter.decrypt(encrypted_data)
print("Decrypted message:", decrypted_data.decode())
API Reference
Spidercryptencrypt Class
Spidercryptencrypt(key)
Parameters:
key (bytes): AES encryption key.
encrypt(plaintext)
Encrypts the given plaintext message.
Parameters:
plaintext (bytes): Message to encrypt.
Returns:
bytes: Encrypted ciphertext.
decrypt(ciphertext)
Decrypts the given ciphertext message.
Parameters:
ciphertext (bytes): Encrypted message.
Returns:
bytes: Decrypted plaintext.
License
This project is licensed under the MIT License. See the LICENSE file for details.
### Customization
- **Features:** Add specific features of your library.
- **Installation:** Ensure clear installation instructions tailored to your environment (e.g., specify required dependencies).
- **Usage Example:** Replace the example with a relevant use case for your library.
- **API Reference:** Add more details about additional methods and parameters if your library has more complex functionality.
- **License:** Modify the License section according to the license you intend to apply to your project.
Once customized, save this `README.md` file in the root directory of your project alongside `setup.py` to provide comprehensive documentation for users and developers interested in using your `Spidercryptencrypt` library.
Raw data
{
"_id": null,
"home_page": "https://github.com/mouhawos/Spidercryptencrypt",
"name": "Spidercryptencrypt",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "encryption decryption cryptography",
"author": "Spidercrypt",
"author_email": "mouhawoss@gmail.com",
"download_url": null,
"platform": null,
"description": "# Spidercryptencrypt\r\n\r\nSpidercryptencrypt is a Python library for AES (Advanced Encryption Standard) encryption and decryption. It provides functionality to securely encrypt sensitive data before storage or transmission.\r\n\r\n## Features\r\n\r\n- AES encryption and decryption in CBC (Cipher Block Chaining) mode.\r\n- Uses PKCS7 padding to handle data lengths that are not multiples of the AES block size.\r\n- Integration with `cryptography`, a Python library for modern cryptography.\r\n\r\n## Installation\r\n\r\nYou can install Spidercryptencrypt via `pip`:\r\n\r\n```bash\r\n\r\nfrom Spidercryptencrypt import Spidercryptencrypt\r\nimport os\r\n\r\n# Generate a secure AES key (replace with a secure key management method)\r\npassword = b\"my_secure_password\"\r\nsalt = os.urandom(16)\r\nkdf = PBKDF2HMAC(\r\n algorithm=hashes.SHA256(),\r\n length=32,\r\n salt=salt,\r\n iterations=100000,\r\n backend=default_backend()\r\n)\r\nkey = kdf.derive(password)\r\n\r\n# Initialize Spidercryptencrypt instance with the generated key\r\ncrypter = Spidercryptencrypt(key)\r\n\r\n# Encrypt a message\r\nplaintext = b\"Hello, world!\"\r\nencrypted_data = crypter.encrypt(plaintext)\r\nprint(\"Encrypted message:\", encrypted_data)\r\n\r\n# Decrypt the encrypted message\r\ndecrypted_data = crypter.decrypt(encrypted_data)\r\nprint(\"Decrypted message:\", decrypted_data.decode())\r\n\r\n\r\nAPI Reference\r\nSpidercryptencrypt Class\r\nSpidercryptencrypt(key)\r\nParameters:\r\nkey (bytes): AES encryption key.\r\nencrypt(plaintext)\r\nEncrypts the given plaintext message.\r\n\r\nParameters:\r\nplaintext (bytes): Message to encrypt.\r\nReturns:\r\nbytes: Encrypted ciphertext.\r\ndecrypt(ciphertext)\r\nDecrypts the given ciphertext message.\r\n\r\nParameters:\r\nciphertext (bytes): Encrypted message.\r\nReturns:\r\nbytes: Decrypted plaintext.\r\n\r\n\r\n\r\nLicense\r\nThis project is licensed under the MIT License. See the LICENSE file for details.\r\n\r\n\r\n\r\n### Customization\r\n\r\n- **Features:** Add specific features of your library.\r\n- **Installation:** Ensure clear installation instructions tailored to your environment (e.g., specify required dependencies).\r\n- **Usage Example:** Replace the example with a relevant use case for your library.\r\n- **API Reference:** Add more details about additional methods and parameters if your library has more complex functionality.\r\n- **License:** Modify the License section according to the license you intend to apply to your project.\r\n\r\nOnce customized, save this `README.md` file in the root directory of your project alongside `setup.py` to provide comprehensive documentation for users and developers interested in using your `Spidercryptencrypt` library.\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A library for encryption and decryption using AES",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/mouhawos/Spidercryptencrypt"
},
"split_keywords": [
"encryption",
"decryption",
"cryptography"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4fac67f30d4c19d3f17de9ffd63c53ca21c379116ed24c33b4dbd49fdabbd613",
"md5": "2037dd7b8ad18622ba9ed7b5b8d80797",
"sha256": "d795281346071791f34b46322943b0a4b46886671e6eaa91c78031c681ad7fd5"
},
"downloads": -1,
"filename": "Spidercryptencrypt-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2037dd7b8ad18622ba9ed7b5b8d80797",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 2587,
"upload_time": "2024-07-05T05:33:16",
"upload_time_iso_8601": "2024-07-05T05:33:16.421090Z",
"url": "https://files.pythonhosted.org/packages/4f/ac/67f30d4c19d3f17de9ffd63c53ca21c379116ed24c33b4dbd49fdabbd613/Spidercryptencrypt-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-05 05:33:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mouhawos",
"github_project": "Spidercryptencrypt",
"github_not_found": true,
"lcname": "spidercryptencrypt"
}