Skip to main content

Simple symmetric encryption and decryption (ECB) for text

Project description

SH Crypt

PyPI Latest Release License codecov CircleCI

A simple symetric encyption decryption algorithm

About

SH Crypt is base on library cryptography algorithm and use more specifically the Electronic Code Book (ECB) for symetric encryption and decryption.

Here are some code example to use the library.

## Generate a key, encrypt and decrypt text

from sh_crypt import GenKeySH, CryptSH
import random as rnd

# Create key generatore
seed = rnd.randint(1, 1e12)
key_gen = GenKeySH(seed)

key = key_gen.gen_sym_key(path_store="mykey.txt")
# Ex : 'e169344ae15719669ed2fecea1ac4773'

password = "Hello World !!"

crypt = CryptSH(key)

encrypt_password = crypt.encrypt_password(password)
# Ex : '469feb93adc2af609a98e6b7cee859bb'

crypt.decrypt_password(encrypt_password)
# 'Hello World !!'

As you can see in the example, you can store your generated key in a text file and reuse it later, with the path_store argument.

Install

You can install sh-crypt with pip:

pip install sh-crypt

or download the sh-crypt source, choose your version, and install with the command:

python setup.py install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sh-crypt-1.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sh_crypt-1.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file sh-crypt-1.1.0.tar.gz.

File metadata

  • Download URL: sh-crypt-1.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for sh-crypt-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ad18b02522d37eeaee19f29bd4693131ac8df2e31cd1e3bafdf2562e6ffc242b
MD5 44540ab966fe224c21077ceb529c20ac
BLAKE2b-256 a49f86aaf22153cc1428a70015b25f272742383a5c2e9df0ac0a4c78097b5d91

See more details on using hashes here.

File details

Details for the file sh_crypt-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: sh_crypt-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for sh_crypt-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 294ed8a19a22ef224d4e1fe7553c7a519b506d96ca98c47020a9956e547e86fa
MD5 ec81d8492adbdded212999447a3f23e5
BLAKE2b-256 11edf4cd4a71b06d0e6fbcc87832f786e88c727d7f060c3e028472ea7cbc0ff6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page