Encrypt and Decrypt data with famous cryptography techniques
Project description
KRYPTOR
CAESAR CIPHER
from kryptor.caesar_cipher import CaesarCipher
obj = CaesarCipher() # Default shift is 3
obj.encrypt("HELLO WORLD") # returns KHOOR ZRUOG
obj.decrypt("KHOOR ZRUOG") # returns HELLO WORLD
obj.encrypt("HELLO WORLD", 5) # returns MJQQT BTWQI
obj.decrypt("MJQQT BTWQI", 5) # returns HELLO WORLD
PLAYFAIR CIPHER
from kryptor.playfair_cipher import PlayfairCipher
obj = PlayfairCipher()
print(obj.encrypt("iamdencoder", "key")) # returns nklfalhildsw
print(obj.decrypt("nklfalhildsw", "key")) # returns iamdencoder
MORSE CODE
from kryptor.morse import Morse
obj = Morse()
print(obj.encrypt('I am Dencoder')) # returns ... .- -- -.. . -. -.-. --- -.. . .-.
print(obj.decrypt('.. .- -- -.. . -. -.-. --- -.. . .-.')) # returns I AM DENCODER
HILL CIPHER
from kryptor.hill_cipher import HillCipher
obj = HillCipher()
print(obj.encrypt('iamdencoder', [[3, 3], [2, 5]])) # returns yqtnzvwwvawd
print(obj.decrypt('yqtnzvwwvawd', [[3, 3], [2, 5]])) # returns iamdencoderz
STEGANOGRAPHY
- Hiding data behind image
from kryptor.img_steganography import ImgSteganography
obj = ImgSteganography()
obj.encrypt('I am Dencoder', 'image.png', 'output.png') # returns output.png
obj.decrypt('output.png') # returns I am Dencoder
- Hiding data behind audio
from kryptor.audio_steganography import AudioSteganography
obj = AudioSteganography()
obj.encrypt('I am Dencoder', 'audio.wav', 'output.wav') # returns output.wav
obj.decrypt('output.wav') # returns I am Dencoder
VIGENERE CIPHER
from kryptor.vigenere_cipher import VigenereCipher
obj = VigenereCipher()
print(obj.encrypt('I am Dencoder', 'key')) # returns s ek nilmsbov
print(obj.decrypt('s ek nilmsbov', 'key')) # returns i am dencoder
RAIL FENCE CIPHER
from kryptor.rail_fence import RailFence
obj = RailFence()
print(obj.encrypt('I am Dencoder', 3)) # returns iedadnoemcr
print(obj.decrypt('iedadnoemcr', 3)) # returns iamdencoder
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
kryptor-0.2.0.tar.gz
(45.5 kB
view details)
Built Distribution
kryptor-0.2.0-py3-none-any.whl
(35.2 kB
view details)
File details
Details for the file kryptor-0.2.0.tar.gz
.
File metadata
- Download URL: kryptor-0.2.0.tar.gz
- Upload date:
- Size: 45.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3706d482926d5a3dc80c84fbebdf33850a32c439f95d4182df3329fee2a8396c |
|
MD5 | d52712c92078e62d5cff0f7a2287699c |
|
BLAKE2b-256 | 468bd9fd0526539e5f362329c3a559a7e0d0d5cb7a134f8bbffc19f5b7369911 |
File details
Details for the file kryptor-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: kryptor-0.2.0-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ece2c2dbb594d53ee5be78ec9f696d6aa335ac8e21d9825a70d89b95eacd3289 |
|
MD5 | bc93f9bc655f241eed70e0e836335fa0 |
|
BLAKE2b-256 | 22d6ff4617f694ac17645b323811ad3be04c19ea88c0af42a04e2e43e9d4222d |