jaanca-utils-encrypt


Namejaanca-utils-encrypt JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/jaanca/python-libraries/tree/main/jaanca-utils-encrypt
SummaryA tool library created by jaanca that allows encrypting and decrypting in different ways.
upload_time2024-06-05 15:49:21
maintainerNone
docs_urlNone
authorJaime Andres Cardona Carrillo
requires_python>=3.8
licenseMIT License
keywords encryption decryption data security secure data
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
    <em>jaanca public libraries</em>
</p>

<p align="center">
<a href="https://pypi.org/project/jaanca-utils-encrypt" target="_blank">
    <img src="https://img.shields.io/pypi/v/jaanca-utils-encrypt?color=blue&label=PyPI%20Package" alt="Package version">
</a>
<a href="(https://www.python.org" target="_blank">
    <img src="https://img.shields.io/badge/Python-%5B%3E%3D3.8%2C%3C%3D3.11%5D-blue" alt="Python">
</a>
</p>


---

#  A tool library created by jaanca

* **Python library**: A tool library created by jaanca that allows encrypting and decrypting in different ways.

[Source code](https://github.com/jaanca/python-libraries/tree/main/jaanca-utils-encrypt)
| [Package (PyPI)](https://pypi.org/project/jaanca-utils-encrypt/)
| [Samples](https://github.com/jaanca/python-libraries/tree/main/jaanca-utils-encrypt/samples)

---

# library installation
```console
pip install jaanca-utils-encrypt --upgrade
```

---
# Example of use

Public and private keys can be generated and saved in text with line separator single_line=False or in a single line with single_line=True.

```Python
from jaanca_chronometer import Chronometer
from jaanca_utils_encrypt import EncryptionRSA

chronometer=Chronometer()
single_line=False
encryption_rsa=EncryptionRSA()

chronometer.start()
encrypt_publicKey, decrypt_privateKey = encryption_rsa.create_keys(len_key_in_bits=2048,single_line=single_line)
chronometer.stop()
create_keys=chronometer.get_elapsed_time()

chronometer.start()
plane_text="Hello World"
encrypted_text = encryption_rsa.encrypt_with_private_key_pkcs1(plane_text,encrypt_publicKey)
chronometer.stop()
encrypt_with_private_key_pkcs1=chronometer.get_elapsed_time()

chronometer.start()
decrypted_text = encryption_rsa.decrypt_with_private_key_pkcs1(encrypted_text,decrypt_privateKey)
chronometer.stop()
decrypt_with_private_key_pkcs1=chronometer.get_elapsed_time()

print(f"encrypted_text: {encrypted_text}")
print(f"decrypted_text: {decrypted_text}")
print(f"time elapsed for create_keys: {create_keys}")
print(f"time elapsed for encrypt_with_private_key_pkcs1 {chronometer.get_format_time()}: {encrypt_with_private_key_pkcs1}")
print(f"time elapsed for decrypt_with_private_key_pkcs1 {chronometer.get_format_time()}: {decrypt_with_private_key_pkcs1}")

# Output

# encrypted_text: tIN2dAOFJ+iwhPR2CRlkyPcKQpr5QmPwXGWTJvMVwrh2FTt67dYhbTnte69Tp76v5KlJSaFoXrcge8wNkxrUtR/9hur7RBdtAQrZG+fMsAKrSNYLedfiaYHxcSmgMvx+Bl81YXaSW+dNGkNVJCp92zhAjps0UkB1KVjsEjEH3eFtb+BxY2WikzCHswm47kmNl9yhSMDHsJo3n8zrEA7Ucrge6CtQ4pofswYFEk84lwyaIQWtPO2Tg7IamdO5DYu82zf3heAm+qqhEPNWT9Ua85YyABUF4DDmRRbFYUh2OxsoePZuFhLlg9PAag0M58Dr4I42AkS6Zur5geBptS/mxA==

# decrypted_text: Hello World

# time elapsed for create_keys: 00:00:02
# time elapsed for encrypt_with_private_key_pkcs1 HH:mm:ss: 00:00:00
# time elapsed for decrypt_with_private_key_pkcs1 HH:mm:ss: 00:00:00


```

---

# Semantic Versioning

jaanca-utils-encrypt < MAJOR >.< MINOR >.< PATCH >

* **MAJOR**: version when you make incompatible API changes
* **MINOR**: version when you add functionality in a backwards compatible manner
* **PATCH**: version when you make backwards compatible bug fixes

## Definitions for releasing versions
* https://peps.python.org/pep-0440/

    - X.YaN (Alpha release): Identify and fix early-stage bugs. Not suitable for production use.
    - X.YbN (Beta release): Stabilize and refine features. Address reported bugs. Prepare for official release.
    - X.YrcN (Release candidate): Final version before official release. Assumes all major features are complete and stable. Recommended for testing in non-critical environments.
    - X.Y (Final release/Stable/Production): Completed, stable version ready for use in production. Full release for public use.
---

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Types of changes

- Added for new features.
- Changed for changes in existing functionality.
- Deprecated for soon-to-be removed features.
- Removed for now removed features.
- Fixed for any bug fixes.
- Security in case of vulnerabilities.

## [0.0.1rcX] - 2024-06-05
### Added
- First tests using pypi.org in develop environment.

## [0.1.X] - 2024-06-05
### Added
- Completion of testing and launch into production.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jaanca/python-libraries/tree/main/jaanca-utils-encrypt",
    "name": "jaanca-utils-encrypt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "encryption, decryption, data security, secure data",
    "author": "Jaime Andres Cardona Carrillo",
    "author_email": "jacardona@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/dc/b0/4b79b660721319e106a9195edb7342c3c223064b3f25299bdb2f66d05199/jaanca_utils_encrypt-0.1.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\r\n    <em>jaanca public libraries</em>\r\n</p>\r\n\r\n<p align=\"center\">\r\n<a href=\"https://pypi.org/project/jaanca-utils-encrypt\" target=\"_blank\">\r\n    <img src=\"https://img.shields.io/pypi/v/jaanca-utils-encrypt?color=blue&label=PyPI%20Package\" alt=\"Package version\">\r\n</a>\r\n<a href=\"(https://www.python.org\" target=\"_blank\">\r\n    <img src=\"https://img.shields.io/badge/Python-%5B%3E%3D3.8%2C%3C%3D3.11%5D-blue\" alt=\"Python\">\r\n</a>\r\n</p>\r\n\r\n\r\n---\r\n\r\n#  A tool library created by jaanca\r\n\r\n* **Python library**: A tool library created by jaanca that allows encrypting and decrypting in different ways.\r\n\r\n[Source code](https://github.com/jaanca/python-libraries/tree/main/jaanca-utils-encrypt)\r\n| [Package (PyPI)](https://pypi.org/project/jaanca-utils-encrypt/)\r\n| [Samples](https://github.com/jaanca/python-libraries/tree/main/jaanca-utils-encrypt/samples)\r\n\r\n---\r\n\r\n# library installation\r\n```console\r\npip install jaanca-utils-encrypt --upgrade\r\n```\r\n\r\n---\r\n# Example of use\r\n\r\nPublic and private keys can be generated and saved in text with line separator single_line=False or in a single line with single_line=True.\r\n\r\n```Python\r\nfrom jaanca_chronometer import Chronometer\r\nfrom jaanca_utils_encrypt import EncryptionRSA\r\n\r\nchronometer=Chronometer()\r\nsingle_line=False\r\nencryption_rsa=EncryptionRSA()\r\n\r\nchronometer.start()\r\nencrypt_publicKey, decrypt_privateKey = encryption_rsa.create_keys(len_key_in_bits=2048,single_line=single_line)\r\nchronometer.stop()\r\ncreate_keys=chronometer.get_elapsed_time()\r\n\r\nchronometer.start()\r\nplane_text=\"Hello World\"\r\nencrypted_text = encryption_rsa.encrypt_with_private_key_pkcs1(plane_text,encrypt_publicKey)\r\nchronometer.stop()\r\nencrypt_with_private_key_pkcs1=chronometer.get_elapsed_time()\r\n\r\nchronometer.start()\r\ndecrypted_text = encryption_rsa.decrypt_with_private_key_pkcs1(encrypted_text,decrypt_privateKey)\r\nchronometer.stop()\r\ndecrypt_with_private_key_pkcs1=chronometer.get_elapsed_time()\r\n\r\nprint(f\"encrypted_text: {encrypted_text}\")\r\nprint(f\"decrypted_text: {decrypted_text}\")\r\nprint(f\"time elapsed for create_keys: {create_keys}\")\r\nprint(f\"time elapsed for encrypt_with_private_key_pkcs1 {chronometer.get_format_time()}: {encrypt_with_private_key_pkcs1}\")\r\nprint(f\"time elapsed for decrypt_with_private_key_pkcs1 {chronometer.get_format_time()}: {decrypt_with_private_key_pkcs1}\")\r\n\r\n# Output\r\n\r\n# encrypted_text: tIN2dAOFJ+iwhPR2CRlkyPcKQpr5QmPwXGWTJvMVwrh2FTt67dYhbTnte69Tp76v5KlJSaFoXrcge8wNkxrUtR/9hur7RBdtAQrZG+fMsAKrSNYLedfiaYHxcSmgMvx+Bl81YXaSW+dNGkNVJCp92zhAjps0UkB1KVjsEjEH3eFtb+BxY2WikzCHswm47kmNl9yhSMDHsJo3n8zrEA7Ucrge6CtQ4pofswYFEk84lwyaIQWtPO2Tg7IamdO5DYu82zf3heAm+qqhEPNWT9Ua85YyABUF4DDmRRbFYUh2OxsoePZuFhLlg9PAag0M58Dr4I42AkS6Zur5geBptS/mxA==\r\n\r\n# decrypted_text: Hello World\r\n\r\n# time elapsed for create_keys: 00:00:02\r\n# time elapsed for encrypt_with_private_key_pkcs1 HH:mm:ss: 00:00:00\r\n# time elapsed for decrypt_with_private_key_pkcs1 HH:mm:ss: 00:00:00\r\n\r\n\r\n```\r\n\r\n---\r\n\r\n# Semantic Versioning\r\n\r\njaanca-utils-encrypt < MAJOR >.< MINOR >.< PATCH >\r\n\r\n* **MAJOR**: version when you make incompatible API changes\r\n* **MINOR**: version when you add functionality in a backwards compatible manner\r\n* **PATCH**: version when you make backwards compatible bug fixes\r\n\r\n## Definitions for releasing versions\r\n* https://peps.python.org/pep-0440/\r\n\r\n    - X.YaN (Alpha release): Identify and fix early-stage bugs. Not suitable for production use.\r\n    - X.YbN (Beta release): Stabilize and refine features. Address reported bugs. Prepare for official release.\r\n    - X.YrcN (Release candidate): Final version before official release. Assumes all major features are complete and stable. Recommended for testing in non-critical environments.\r\n    - X.Y (Final release/Stable/Production): Completed, stable version ready for use in production. Full release for public use.\r\n---\r\n\r\n# Changelog\r\n\r\nAll notable changes to this project will be documented in this file.\r\n\r\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\r\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\r\n\r\n## Types of changes\r\n\r\n- Added for new features.\r\n- Changed for changes in existing functionality.\r\n- Deprecated for soon-to-be removed features.\r\n- Removed for now removed features.\r\n- Fixed for any bug fixes.\r\n- Security in case of vulnerabilities.\r\n\r\n## [0.0.1rcX] - 2024-06-05\r\n### Added\r\n- First tests using pypi.org in develop environment.\r\n\r\n## [0.1.X] - 2024-06-05\r\n### Added\r\n- Completion of testing and launch into production.\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A tool library created by jaanca that allows encrypting and decrypting in different ways.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/jaanca/python-libraries/tree/main/jaanca-utils-encrypt"
    },
    "split_keywords": [
        "encryption",
        " decryption",
        " data security",
        " secure data"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9227b9be7708081e99d183571aa178bc8df4d45fd92db065e5b026b779e6fe53",
                "md5": "e968746520e7dbae9d63f0fbccf2830c",
                "sha256": "83cd4db6c0701dcbec4dc1b8a60561e659cfa6985a97be3ccb46938e043dc081"
            },
            "downloads": -1,
            "filename": "jaanca_utils_encrypt-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e968746520e7dbae9d63f0fbccf2830c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6218,
            "upload_time": "2024-06-05T15:49:19",
            "upload_time_iso_8601": "2024-06-05T15:49:19.849164Z",
            "url": "https://files.pythonhosted.org/packages/92/27/b9be7708081e99d183571aa178bc8df4d45fd92db065e5b026b779e6fe53/jaanca_utils_encrypt-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dcb04b79b660721319e106a9195edb7342c3c223064b3f25299bdb2f66d05199",
                "md5": "60bc61e7c1336ada79a54b9ed21a9299",
                "sha256": "322f8107acfe1528c5778489b4c72bcfafba8e3d1564742eb7fbfde8cfebd3ee"
            },
            "downloads": -1,
            "filename": "jaanca_utils_encrypt-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "60bc61e7c1336ada79a54b9ed21a9299",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5417,
            "upload_time": "2024-06-05T15:49:21",
            "upload_time_iso_8601": "2024-06-05T15:49:21.494290Z",
            "url": "https://files.pythonhosted.org/packages/dc/b0/4b79b660721319e106a9195edb7342c3c223064b3f25299bdb2f66d05199/jaanca_utils_encrypt-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-05 15:49:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jaanca",
    "github_project": "python-libraries",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jaanca-utils-encrypt"
}
        
Elapsed time: 0.29903s