Skip to main content

GitHub Pages
PyPI

cryptography

Easy implementation of professional Python cryptography packages


Installation

pip install kabbes_cryptography


Usage

For more in-depth documentation, read the information provided on the Pages. Or better yet, read the source code.

import kabbes_cryptography as kcryp
import dir_ops as do

RSA

# Initializing RSA tokens
RSA_inst = kcryp.RSA()
RSA_inst.get_new_Keys( set = True )
RSA_inst.export_public_Key( do.Path( 'publickey' ) )
RSA_inst.export_private_Key( do.Path( 'privatekey' ) )
#Encryption with RSA
RSA_inst.encrypt( bytes('test', encoding = 'utf-8') )
print (RSA_inst.encrypted)
>>> b'nb\\\x02|:M\x82\x8a\xe1\xc7U\xfd\x1e\xc5O\xcc\x7f\x06\xc2~\xaf\x85"\ -- ETC -- '
#Decryption with RSA
dec_message = RSA_inst.decrypt()
print (dec_message.decode( 'utf-8' ))
>>> 'test'

AES

# Initializing AES
AES_inst = kcryp.AES()
AES_inst.prep_for_encrypt()
AES_inst.encrypt( bytes('test', encoding = 'utf-8') )
print (AES_inst.encrypted)
>>> b'\xd1\xf8\x0b='
dec_message = AES_inst.decrypt()
print (dec_message.decode( 'utf-8' ))
>>> 'test'

Combined

# Initializing Combined
Combined_inst = kcryp.Combined( Dir = do.Dir( do.get_cwd() ).join_Dir( path = 'CombinedEncryption' ) )
Combined_inst.RSA.import_private_Key( do.Path( 'privatekey' ), set=True )
Combined_inst.RSA.import_public_Key( do.Path( 'publickey' ), set=True )
Combined_inst.encrypt( bytes('test', encoding = 'utf-8' ) )
print (Combined_inst.encrypted)
>>> b'\xdeA\xe7\x1e'
dec_message = Combined_inst.decrypt()
print (dec_message.decode( 'utf-8 '))
>>> 'test'

Author

James Kabbes

Metadata

Release files for kabbes-cryptography 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kabbes-cryptography 0.1.0
File Size Uploaded
kabbes_cryptography-0.1.0.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kabbes-cryptography 0.1.0
File Interpreter ABI Platform
kabbes_cryptography-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / kabbes_cryptography-0.1.0.tar.gz

Download URL kabbes_cryptography-0.1.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6f961a77ff2cb7a8840d83b1601673413e99a3751ee24644ae4a78b035fad77f
BLAKE2b-256 checksum
How to use checksums
c4aa3542bb6d01ca1fd1f80201ebbdd069729437e1f6cc9c43f38ab9501e30a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.1 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Release files / kabbes_cryptography-0.1.0-py3-none-any.whl

Download URL kabbes_cryptography-0.1.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97c7ca8ba908c25ed6bdcbafc3725256d73bc0620dcf8801dc9546449ae241ee
BLAKE2b-256 checksum
How to use checksums
77943bd0ca743f8f47e71b70840758f1821d091a0c3a0828e725087e2924a285
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.1 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page