risclog.cryptography


Namerisclog.cryptography JSON
Version 1.0 PyPI version JSON
download
home_pagehttps://github.com/risclog-solution/risclog.cryptography
SummaryThe CryptographyManager is a tool designed to securely encrypt and decrypt messages and data. It uses modern encryption techniques to protect confidential information.
upload_time2024-09-11 09:54:10
maintainerNone
docs_urlNone
authorriscLOG Solution GmbH
requires_python>=3.6
licenseMIT license
keywords risclog.cryptography
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ====================
risclog.cryptography
====================

.. image:: https://github.com/risclog-solution/risclog.cryptography/actions/workflows/test.yml/badge.svg
     :target: https://github.com/risclog-solution/risclog.cryptography/actions/workflows/test.yml
     :alt: CI Status


.. image:: https://img.shields.io/pypi/v/risclog.cryptography.svg
        :target: https://pypi.python.org/pypi/risclog.cryptography


The CryptographyManager is a tool designed to securely encrypt and decrypt messages and data. It uses modern encryption techniques to protect confidential information.


* Free software: MIT license
* Documentation: https://risclog.cryptography.readthedocs.io.


Requirements
============

To use the CryptographyManager, ensure you have the following:
    * Python 3.9 or later
    * The cryptography library, which can be installed using pip install cryptography.


Installation
============

Download the code for the CryptographyManager into your Python environment or add it directly to your Python project. Make sure that all dependencies are installed.

Example for installing the cryptography library::

   $ pip install risclog.cryptography


Usage
=====

Initialization
--------------

To use the CryptographyManager, you will need a password and a "salt" (a random string to enhance security).

.. code-block:: python

   from risclog.cryptography import CryptographyManager

   password = "my_secure_password"
   salt = "my_secure_salt"

   # Initialize the CryptographyManager
   crypto_manager = CryptographyManager(password=password, salt=salt)

Encryption
----------

To encrypt a message, use the encrypt method. This is particularly useful for protecting sensitive data like passwords or personal information.

#. Input the text you want to encrypt.
#. Call the encrypt method.


.. code-block:: python

   message = "This is a secret message"
   encrypted_message = crypto_manager.encrypt(message)

   print(f"Encrypted message: {encrypted_message}")


Troubleshooting
===============

**Wrong password or salt:** If you try to decrypt a message with a different password or salt than what was used for encryption, you will get an error. Make sure to use the same password and salt.

**Invalid messages:** Encryption requires valid strings or bytes. Ensure the text is correctly formatted.

**Event-loop issues (with async):** If you're using the encryption in an asynchronous environment (e.g., web applications), the manager will automatically detect if an event loop is running and adjust accordingly.

Security Tips
=============

**Password security:** Choose a strong and secure password. A weak password can compromise the security of the encryption.

**Use salt:** Whenever possible, use a salt to make brute-force attacks more difficult. The salt should be unique for each user or message.

**Key storage:** Safeguard the password and salt securely. If they are lost, encrypted data cannot be recovered.

Tests
=====

Run tests::

    $ ./pytest


Credits
=======

This package was created with Cookiecutter_ and the `risclog-solution/risclog-cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`risclog-solution/risclog-cookiecutter-pypackage`: https://github.com/risclog-solution/risclog-cookiecutter-pypackage


This package uses AppEnv_ for running tests inside this package.

.. _AppEnv: https://github.com/flyingcircusio/appenv


===================================
Change log for risclog.cryptography
===================================


1.0 (2024-09-11)
================

* initial release

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/risclog-solution/risclog.cryptography",
    "name": "risclog.cryptography",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "risclog.cryptography",
    "author": "riscLOG Solution GmbH",
    "author_email": "info@risclog.de",
    "download_url": "https://files.pythonhosted.org/packages/d5/9d/b8451f4531252906e8ab6c08c27014a9cc7d422400a705ef0cd82488c0e0/risclog.cryptography-1.0.tar.gz",
    "platform": null,
    "description": "====================\nrisclog.cryptography\n====================\n\n.. image:: https://github.com/risclog-solution/risclog.cryptography/actions/workflows/test.yml/badge.svg\n     :target: https://github.com/risclog-solution/risclog.cryptography/actions/workflows/test.yml\n     :alt: CI Status\n\n\n.. image:: https://img.shields.io/pypi/v/risclog.cryptography.svg\n        :target: https://pypi.python.org/pypi/risclog.cryptography\n\n\nThe CryptographyManager is a tool designed to securely encrypt and decrypt messages and data. It uses modern encryption techniques to protect confidential information.\n\n\n* Free software: MIT license\n* Documentation: https://risclog.cryptography.readthedocs.io.\n\n\nRequirements\n============\n\nTo use the CryptographyManager, ensure you have the following:\n    * Python 3.9 or later\n    * The cryptography library, which can be installed using pip install cryptography.\n\n\nInstallation\n============\n\nDownload the code for the CryptographyManager into your Python environment or add it directly to your Python project. Make sure that all dependencies are installed.\n\nExample for installing the cryptography library::\n\n   $ pip install risclog.cryptography\n\n\nUsage\n=====\n\nInitialization\n--------------\n\nTo use the CryptographyManager, you will need a password and a \"salt\" (a random string to enhance security).\n\n.. code-block:: python\n\n   from risclog.cryptography import CryptographyManager\n\n   password = \"my_secure_password\"\n   salt = \"my_secure_salt\"\n\n   # Initialize the CryptographyManager\n   crypto_manager = CryptographyManager(password=password, salt=salt)\n\nEncryption\n----------\n\nTo encrypt a message, use the encrypt method. This is particularly useful for protecting sensitive data like passwords or personal information.\n\n#. Input the text you want to encrypt.\n#. Call the encrypt method.\n\n\n.. code-block:: python\n\n   message = \"This is a secret message\"\n   encrypted_message = crypto_manager.encrypt(message)\n\n   print(f\"Encrypted message: {encrypted_message}\")\n\n\nTroubleshooting\n===============\n\n**Wrong password or salt:** If you try to decrypt a message with a different password or salt than what was used for encryption, you will get an error. Make sure to use the same password and salt.\n\n**Invalid messages:** Encryption requires valid strings or bytes. Ensure the text is correctly formatted.\n\n**Event-loop issues (with async):** If you're using the encryption in an asynchronous environment (e.g., web applications), the manager will automatically detect if an event loop is running and adjust accordingly.\n\nSecurity Tips\n=============\n\n**Password security:** Choose a strong and secure password. A weak password can compromise the security of the encryption.\n\n**Use salt:** Whenever possible, use a salt to make brute-force attacks more difficult. The salt should be unique for each user or message.\n\n**Key storage:** Safeguard the password and salt securely. If they are lost, encrypted data cannot be recovered.\n\nTests\n=====\n\nRun tests::\n\n    $ ./pytest\n\n\nCredits\n=======\n\nThis package was created with Cookiecutter_ and the `risclog-solution/risclog-cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`risclog-solution/risclog-cookiecutter-pypackage`: https://github.com/risclog-solution/risclog-cookiecutter-pypackage\n\n\nThis package uses AppEnv_ for running tests inside this package.\n\n.. _AppEnv: https://github.com/flyingcircusio/appenv\n\n\n===================================\nChange log for risclog.cryptography\n===================================\n\n\n1.0 (2024-09-11)\n================\n\n* initial release\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "The CryptographyManager is a tool designed to securely encrypt and decrypt messages and data. It uses modern encryption techniques to protect confidential information.",
    "version": "1.0",
    "project_urls": {
        "Homepage": "https://github.com/risclog-solution/risclog.cryptography"
    },
    "split_keywords": [
        "risclog.cryptography"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a3004897f68f02271fa5e156a22a84fe5b10cc7dac5783e61382ad64e23bd65",
                "md5": "28c82d8ed816ece34f97cec2bcdffdfa",
                "sha256": "05f7b7f66ff177c7ee6a466d0181022b6774649e48d705846e77adee0eca5d04"
            },
            "downloads": -1,
            "filename": "risclog.cryptography-1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "28c82d8ed816ece34f97cec2bcdffdfa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6811,
            "upload_time": "2024-09-11T09:54:08",
            "upload_time_iso_8601": "2024-09-11T09:54:08.659061Z",
            "url": "https://files.pythonhosted.org/packages/4a/30/04897f68f02271fa5e156a22a84fe5b10cc7dac5783e61382ad64e23bd65/risclog.cryptography-1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d59db8451f4531252906e8ab6c08c27014a9cc7d422400a705ef0cd82488c0e0",
                "md5": "9dbe4901c872740062b944fd3fe2821d",
                "sha256": "46ce10fa1661537b30ac80745686c899dd800d7f42f576f8d198f67db79e474c"
            },
            "downloads": -1,
            "filename": "risclog.cryptography-1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9dbe4901c872740062b944fd3fe2821d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 12831,
            "upload_time": "2024-09-11T09:54:10",
            "upload_time_iso_8601": "2024-09-11T09:54:10.493941Z",
            "url": "https://files.pythonhosted.org/packages/d5/9d/b8451f4531252906e8ab6c08c27014a9cc7d422400a705ef0cd82488c0e0/risclog.cryptography-1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-11 09:54:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "risclog-solution",
    "github_project": "risclog.cryptography",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "risclog.cryptography"
}
        
Elapsed time: 0.95402s