Encode and Decode strings with Cryptography
Project description
Encode and Decode strings with Cryptography
Install
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
from ddcCryptography import Cryptography
cp = Cryptography()
cp.generate_private_key()
- ENCODE
- Encodes a given string
from ddcCryptography import Cryptography
str_to_encode = "test_str"
cp = Cryptography()
cp.encode(str_to_encode)
from ddcCryptography import Cryptography
str_to_encode = "test_str"
cp = Cryptography("my_private_key")
cp.encode(str_to_encode)
- DECODE
- Decodes a given string
from ddcCryptography import Cryptography
str_to_decode = "gAAAAABnSdKi5V81C_8FkM_I1rW_zTuyfnxCvvZPGFoAoHWwKzceue8NopSpWm-pDAp9pwAIW3xPbACuOz_6AhZOcjs3NM7miw=="
cp = Cryptography()
cp.decode(str_to_decode)
from ddcCryptography import Cryptography
str_to_decode = "gAAAAABnSdKi5V81C_8FkM_I1rW_zTuyfnxCvvZPGFoAoHWwKzceue8NopSpWm-pDAp9pwAIW3xPbACuOz_6AhZOcjs3NM7miw=="
cp = Cryptography("my_private_key")
cp.decode(str_to_decode)
Source Code
Build
poetry build -f wheel
Run Tests and Get Coverage Report using Poe
poetry update --with test
poe tests
License
Released under the MIT License
Buy me a cup of coffee
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
Built Distribution
File details
Details for the file ddccryptography-1.0.11.tar.gz
.
File metadata
- Download URL: ddccryptography-1.0.11.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b116b937964564aa212abef91071526252dc62f977a1d4907cf364551a88771c
|
|
MD5 |
79336855761d6ab686f32a4bba5d37ba
|
|
BLAKE2b-256 |
7216c01be26b83c9f845e8cf07780ca2d7e9b25da8d9aac95e79cfb6f6fe7702
|
Provenance
The following attestation bundles were made for ddccryptography-1.0.11.tar.gz
:
Publisher:
workflow.yml
on ddc/ddcCryptography
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
ddccryptography-1.0.11.tar.gz
-
Subject digest:
b116b937964564aa212abef91071526252dc62f977a1d4907cf364551a88771c
- Sigstore transparency entry: 156737417
- Sigstore integration time:
-
Permalink:
ddc/ddcCryptography@1e8762985e064a9c217c6d44928621ae6408fb04
-
Branch / Tag:
refs/heads/main
- Owner: https://github.com/ddc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
workflow.yml@1e8762985e064a9c217c6d44928621ae6408fb04
-
Trigger Event:
push
-
Statement type:
File details
Details for the file ddccryptography-1.0.11-py3-none-any.whl
.
File metadata
- Download URL: ddccryptography-1.0.11-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
c72250dad9503215ac5b39d12e1535c301bde1a166db3c461c9a2064932b25ea
|
|
MD5 |
e1c259f7c9759b493ef43130b1166dcf
|
|
BLAKE2b-256 |
e8c7c668c2d5931a55e521cbb9bbc819712859697dd10330f95125d2734c856b
|
Provenance
The following attestation bundles were made for ddccryptography-1.0.11-py3-none-any.whl
:
Publisher:
workflow.yml
on ddc/ddcCryptography
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
ddccryptography-1.0.11-py3-none-any.whl
-
Subject digest:
c72250dad9503215ac5b39d12e1535c301bde1a166db3c461c9a2064932b25ea
- Sigstore transparency entry: 156737418
- Sigstore integration time:
-
Permalink:
ddc/ddcCryptography@1e8762985e064a9c217c6d44928621ae6408fb04
-
Branch / Tag:
refs/heads/main
- Owner: https://github.com/ddc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
workflow.yml@1e8762985e064a9c217c6d44928621ae6408fb04
-
Trigger Event:
push
-
Statement type: