Module which helps in encryption and decryption
Reason this release was yanked:
Unable to import package
Project description
[cipher_kit] Module which helps in encryption and decryption
This module helps in Encryption and decryption.
Encryption Algorithm:
- Create list of unicode value of each letter of key (key_list).
- Iterate key_list (i).
- Multiple text[i] with key_list[i] and store somewhere (data).
- divide data by 2 and store remainder (remainder).
- Now append data and remainder in our encrypted data.
- Repeat this process until all data encrypted.
Decryption Algorithm
- Create a list of unicode value of each letter of key (key_list), index=0.
- Create a list of pair of text (text_list = [[data, remainder], ...]).
- Iterate text_list (i).
- Multiply first element of text_list[i] with 2
- Add second element of text_list[i]
- Now divide by key_list[index].
- Append decrypted text with unicode character of this value.
- Increment index by 1 and set to 0 if index >= length of key_list.
- 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
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
cipher_kit-0.0.2.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for cipher_kit-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fde927a7f36b5fe86aab69042389c32b9bbb7a5b3e3c41b05b4ca58cdae11b2b |
|
MD5 | d2da5e78ecd6e2712f90767a46bf2673 |
|
BLAKE2b-256 | 228de2b196de2a014f2fcc4ed6c8a35b068047b3c09b27486fcd17b6c8790863 |