# Encode and Decode strings with Cryptography
[](https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ)
[](https://opensource.org/licenses/MIT)
[](https://pypi.python.org/pypi/ddcCryptography)
[](https://pepy.tech/projects/ddcCryptography)
[](https://codecov.io/gh/ddc/ddcCryptography)
[](https://github.com/ddc/ddcCryptography/actions/workflows/workflow.yml)
[](https://sonarcloud.io/dashboard?id=ddc_ddcCryptography)
[](https://actions-badge.atrox.dev/ddc/ddcCryptography/goto?ref=main)
[](https://github.com/psf/black)
[](https://www.python.org/downloads)
[](https://github.com/sponsors/ddc)
## Table of Contents
- [Install](#install)
- [Cryptography](#cryptography)
- [Generate Private Key](#generate-private-key)
- [Encode](#encode)
- [Decode](#decode)
- [Development](#development)
- [Building from Source](#building-from-source)
- [Running Tests](#running-tests)
- [License](#license)
- [Support](#support)
# Install
```shell
pip install ddcCryptography
```
# Cryptography
## Generate Private Key
+ Generates a private key to be used instead of default one
+ But keep in mind that this private key WILL BE NEEDED TO DECODE FURTHER STRINGS
+ Example of custom private key as "my_private_key" bellow
```python
from ddcCryptography import Cryptography
cp = Cryptography()
cp.generate_private_key()
```
## Encode
+ Encodes a given string
```python
from ddcCryptography import Cryptography
str_to_encode = "test_str"
cp = Cryptography()
cp.encode(str_to_encode)
```
```python
from ddcCryptography import Cryptography
str_to_encode = "test_str"
cp = Cryptography("my_private_key")
cp.encode(str_to_encode)
```
## Decode
+ Decode a given string
```python
from ddcCryptography import Cryptography
str_to_decode = "gAAAAABnSdKi5V81C_8FkM_I1rW_zTuyfnxCvvZPGFoAoHWwKzceue8NopSpWm-pDAp9pwAIW3xPbACuOz_6AhZOcjs3NM7miw=="
cp = Cryptography()
cp.decode(str_to_decode)
```
```python
from ddcCryptography import Cryptography
str_to_decode = "gAAAAABnSdKi5V81C_8FkM_I1rW_zTuyfnxCvvZPGFoAoHWwKzceue8NopSpWm-pDAp9pwAIW3xPbACuOz_6AhZOcjs3NM7miw=="
cp = Cryptography("my_private_key")
cp.decode(str_to_decode)
```
# Development
### Building from Source
```shell
poetry build -f wheel
```
### Running Tests
```shell
poetry update --with test
poe tests
```
# License
Released under the [MIT License](LICENSE)
# Support
If you find this project helpful, consider supporting development:
- [GitHub Sponsor](https://github.com/sponsors/ddc)
- [ko-fi](https://ko-fi.com/ddcsta)
- [PayPal](https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ)
Raw data
{
"_id": null,
"home_page": null,
"name": "ddcCryptography",
"maintainer": "Daniel Costa",
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": "python3, python-3, python, cryptography, encode, encoder, decode, decoder, ddcCryptography",
"author": "Daniel Costa",
"author_email": "danieldcsta@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f9/a8/a389262b9de843b8a9b3b5fe70f805952a00a145e1e2610f812af87d28fd/ddccryptography-1.0.13.tar.gz",
"platform": null,
"description": "# Encode and Decode strings with Cryptography\n\n[](https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ)\n[](https://opensource.org/licenses/MIT)\n[](https://pypi.python.org/pypi/ddcCryptography)\n[](https://pepy.tech/projects/ddcCryptography)\n[](https://codecov.io/gh/ddc/ddcCryptography)\n[](https://github.com/ddc/ddcCryptography/actions/workflows/workflow.yml)\n[](https://sonarcloud.io/dashboard?id=ddc_ddcCryptography) \n[](https://actions-badge.atrox.dev/ddc/ddcCryptography/goto?ref=main)\n[](https://github.com/psf/black)\n[](https://www.python.org/downloads)\n\n[](https://github.com/sponsors/ddc)\n\n## Table of Contents\n\n- [Install](#install)\n- [Cryptography](#cryptography)\n - [Generate Private Key](#generate-private-key)\n - [Encode](#encode)\n - [Decode](#decode)\n- [Development](#development)\n - [Building from Source](#building-from-source)\n - [Running Tests](#running-tests)\n- [License](#license)\n- [Support](#support)\n\n# Install\n```shell\npip install ddcCryptography\n```\n\n# Cryptography\n\n## Generate Private Key\n+ Generates a private key to be used instead of default one\n+ But keep in mind that this private key WILL BE NEEDED TO DECODE FURTHER STRINGS\n+ Example of custom private key as \"my_private_key\" bellow\n\n```python\nfrom ddcCryptography import Cryptography\ncp = Cryptography()\ncp.generate_private_key()\n```\n\n\n\n## Encode\n+ Encodes a given string\n```python\nfrom ddcCryptography import Cryptography\nstr_to_encode = \"test_str\"\ncp = Cryptography()\ncp.encode(str_to_encode)\n```\n\n```python\nfrom ddcCryptography import Cryptography\nstr_to_encode = \"test_str\"\ncp = Cryptography(\"my_private_key\")\ncp.encode(str_to_encode)\n```\n \n\n\n## Decode\n+ Decode a given string\n```python\nfrom ddcCryptography import Cryptography\nstr_to_decode = \"gAAAAABnSdKi5V81C_8FkM_I1rW_zTuyfnxCvvZPGFoAoHWwKzceue8NopSpWm-pDAp9pwAIW3xPbACuOz_6AhZOcjs3NM7miw==\"\ncp = Cryptography()\ncp.decode(str_to_decode)\n```\n\n```python\nfrom ddcCryptography import Cryptography\nstr_to_decode = \"gAAAAABnSdKi5V81C_8FkM_I1rW_zTuyfnxCvvZPGFoAoHWwKzceue8NopSpWm-pDAp9pwAIW3xPbACuOz_6AhZOcjs3NM7miw==\"\ncp = Cryptography(\"my_private_key\")\ncp.decode(str_to_decode)\n```\n\n\n\n# Development\n\n### Building from Source\n```shell\npoetry build -f wheel\n```\n\n### Running Tests\n```shell\npoetry update --with test\npoe tests\n```\n\n\n\n# License\nReleased under the [MIT License](LICENSE)\n\n\n\n# Support\nIf you find this project helpful, consider supporting development:\n\n- [GitHub Sponsor](https://github.com/sponsors/ddc)\n- [ko-fi](https://ko-fi.com/ddcsta)\n- [PayPal](https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ)\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Encode and Decode strings with Cryptography",
"version": "1.0.13",
"project_urls": {
"Homepage": "https://pypi.org/project/ddcCryptography",
"Repository": "https://github.com/ddc/ddcCryptography"
},
"split_keywords": [
"python3",
" python-3",
" python",
" cryptography",
" encode",
" encoder",
" decode",
" decoder",
" ddccryptography"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "017da97d26ad374749eacf1798d49f36589fa33bbb714863b890ba57d4dfd354",
"md5": "cc01bcaadc4a893e69d2d52b3538d0d5",
"sha256": "9a05c2d7a92682a3617343bf8e9e87a3e743a794901754f916e1c2e1672d472c"
},
"downloads": -1,
"filename": "ddccryptography-1.0.13-cp312-cp312-macosx_14_0_arm64.whl",
"has_sig": false,
"md5_digest": "cc01bcaadc4a893e69d2d52b3538d0d5",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": "<4.0,>=3.12",
"size": 5288,
"upload_time": "2025-07-25T23:39:56",
"upload_time_iso_8601": "2025-07-25T23:39:56.718551Z",
"url": "https://files.pythonhosted.org/packages/01/7d/a97d26ad374749eacf1798d49f36589fa33bbb714863b890ba57d4dfd354/ddccryptography-1.0.13-cp312-cp312-macosx_14_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5f5bbf11609f3bf15b1bbb9fc2056d6e10b013d85c33eae97bb4078e8407d519",
"md5": "94e4f3f8f2b53c55685fb4bb184ceec9",
"sha256": "de7fbe639bde1a78e79b2f6f7c6db46597ac7f5bb017e8671eb5370ac9b38eca"
},
"downloads": -1,
"filename": "ddccryptography-1.0.13-cp312-cp312-manylinux_2_39_x86_64.whl",
"has_sig": false,
"md5_digest": "94e4f3f8f2b53c55685fb4bb184ceec9",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": "<4.0,>=3.12",
"size": 5292,
"upload_time": "2025-07-25T23:39:57",
"upload_time_iso_8601": "2025-07-25T23:39:57.756641Z",
"url": "https://files.pythonhosted.org/packages/5f/5b/bf11609f3bf15b1bbb9fc2056d6e10b013d85c33eae97bb4078e8407d519/ddccryptography-1.0.13-cp312-cp312-manylinux_2_39_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0e5b7411645bd3741287d82fc06792bfc15b87cf8b2c9c1b809006bf293ed959",
"md5": "010847014c131f1ed551e2a169afb86b",
"sha256": "163f288789acfd091094acd4e0195a966f3c720b4a7b088749d91d1b812db61e"
},
"downloads": -1,
"filename": "ddccryptography-1.0.13-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "010847014c131f1ed551e2a169afb86b",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": "<4.0,>=3.12",
"size": 5317,
"upload_time": "2025-07-25T23:39:58",
"upload_time_iso_8601": "2025-07-25T23:39:58.384300Z",
"url": "https://files.pythonhosted.org/packages/0e/5b/7411645bd3741287d82fc06792bfc15b87cf8b2c9c1b809006bf293ed959/ddccryptography-1.0.13-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f5ae06299058693a0cfe4a7c7e2b04d1593426b4886f99aedf9ac953ef4ecd16",
"md5": "2df1a9a3d188fbbc9c17bc7184aaff72",
"sha256": "8df600a718d5714918a81e6431271166a50cb9914ba3821f9b1c1cdceb70c108"
},
"downloads": -1,
"filename": "ddccryptography-1.0.13-cp313-cp313-macosx_14_0_arm64.whl",
"has_sig": false,
"md5_digest": "2df1a9a3d188fbbc9c17bc7184aaff72",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": "<4.0,>=3.12",
"size": 5287,
"upload_time": "2025-07-25T23:39:59",
"upload_time_iso_8601": "2025-07-25T23:39:59.322119Z",
"url": "https://files.pythonhosted.org/packages/f5/ae/06299058693a0cfe4a7c7e2b04d1593426b4886f99aedf9ac953ef4ecd16/ddccryptography-1.0.13-cp313-cp313-macosx_14_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "32ace522b425dab9bc1ffb85a88f7e7b47685d2595d7bea489695e394069d68e",
"md5": "dbbf62b548953324227f2fd39e0ed517",
"sha256": "5dc405261132ef55b6225ed8ab6fac092faf2a17ba282eecf31d29b04d855850"
},
"downloads": -1,
"filename": "ddccryptography-1.0.13-cp313-cp313-manylinux_2_39_x86_64.whl",
"has_sig": false,
"md5_digest": "dbbf62b548953324227f2fd39e0ed517",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": "<4.0,>=3.12",
"size": 5292,
"upload_time": "2025-07-25T23:40:00",
"upload_time_iso_8601": "2025-07-25T23:40:00.429346Z",
"url": "https://files.pythonhosted.org/packages/32/ac/e522b425dab9bc1ffb85a88f7e7b47685d2595d7bea489695e394069d68e/ddccryptography-1.0.13-cp313-cp313-manylinux_2_39_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "50ace1c617815f4642eaa359bb5c1c060a1a417ef231e43c53110d178c67cc39",
"md5": "99b2067a3ab70d920da117088061b814",
"sha256": "74a3377a6c803766677912f30dbe7cb11fd7411609384ccdad3648bca09d65ef"
},
"downloads": -1,
"filename": "ddccryptography-1.0.13-cp313-cp313-win_amd64.whl",
"has_sig": false,
"md5_digest": "99b2067a3ab70d920da117088061b814",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": "<4.0,>=3.12",
"size": 5317,
"upload_time": "2025-07-25T23:40:02",
"upload_time_iso_8601": "2025-07-25T23:40:02.615599Z",
"url": "https://files.pythonhosted.org/packages/50/ac/e1c617815f4642eaa359bb5c1c060a1a417ef231e43c53110d178c67cc39/ddccryptography-1.0.13-cp313-cp313-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f9a8a389262b9de843b8a9b3b5fe70f805952a00a145e1e2610f812af87d28fd",
"md5": "3e120f9ea3ace6d316ee3909ffbf3a0c",
"sha256": "9269a4fe51367a332033464357408f923621a194e1b349a6b6fcb63d70d09306"
},
"downloads": -1,
"filename": "ddccryptography-1.0.13.tar.gz",
"has_sig": false,
"md5_digest": "3e120f9ea3ace6d316ee3909ffbf3a0c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 5481,
"upload_time": "2025-07-25T23:40:03",
"upload_time_iso_8601": "2025-07-25T23:40:03.652925Z",
"url": "https://files.pythonhosted.org/packages/f9/a8/a389262b9de843b8a9b3b5fe70f805952a00a145e1e2610f812af87d28fd/ddccryptography-1.0.13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 23:40:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ddc",
"github_project": "ddcCryptography",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ddccryptography"
}