Skip to main content

Module which helps in encryption and decryption

Project description

[cipher_kit] Module which helps in encryption and decryption

This module helps in Encryption and decryption.

Encryption Algorithm:

  1. Create list of unicode value of each letter of key (key_list).
  2. Iterate key_list (i).
  3. Multiple text[i] with key_list[i] and store somewhere (data).
  4. divide data by 2 and store remainder (remainder).
  5. Now append data and remainder in our encrypted data.
  6. Repeat this process until all data encrypted.

Decryption Algorithm

  1. Create a list of unicode value of each letter of key (key_list), index=0.
  2. Create a list of pair of text (text_list = [[data, remainder], ...]).
  3. Iterate text_list (i).
  4. Multiply first element of text_list[i] with 2
  5. Add second element of text_list[i]
  6. Now divide by key_list[index].
  7. Append decrypted text with unicode character of this value.
  8. Increment index by 1 and set to 0 if index >= length of key_list.
  9. Repeat this process until all data decrypted.

Usage

How to import

from cipher_kit import Cipher

To Encrypt

data = "Data to be encrypted"
key = "Secret key"

encrypted_data = Cipher.encrypt(data, key)

To decrypt

encrypted_data: str
decryted_data = Cipher.decrypt(encrypted_data, key)

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

cipher_kit-0.0.4.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

cipher_kit-0.0.4-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file cipher_kit-0.0.4.tar.gz.

File metadata

  • Download URL: cipher_kit-0.0.4.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for cipher_kit-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4e0d9537a1431d629ae9599afe3323745f399f35533f54c02181ae33afb97ece
MD5 1721e9a73880418215c3ec5c052c9967
BLAKE2b-256 7e98095c30a2fe2d4a4fa318ecf4f5be32a1319cb9c35fcce99adca8f34add2e

See more details on using hashes here.

File details

Details for the file cipher_kit-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: cipher_kit-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for cipher_kit-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4308d181dcc5b52688bf3eedd9a2aa56ca124bda7ac99effa91d13b2b6db7676
MD5 66d0a2ab5ed19eac7746ae4acec211da
BLAKE2b-256 0f6968813438379df9b435514a0eed23cb5d5bbc4d6bf2179e1e7cf93ac3ed4f

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