Skip to main content

Encrypt and Decrypt data with famous cryptography techniques

Project description

KRYPTOR

GitHub issues GitHub forks GitHub stars GitHub license Twitter Maintainability GitHub release (latest by date)

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


  1. 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
  1. 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

VERNAM CIPHER


from kryptor.vernam_cipher import VernamCipher

obj = VernamCipher()
print(obj.encrypt("I am Dencoder", "Python Coder")) # returns xyfksaecgii
print(obj.decrypt("xyfksaecgii", "Python Coder")) # returns iamdencoder

BLOWFISH CIPHER


from kryptor.blowfish_cipher import BlowfishCipher

obj = BlowfishCipher()
print(obj.encrypt(1684)) # returns 8301200985422371632
print(obj.decrypt(8301200985422371632)) # returns 1684

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

kryptor-0.4.0.tar.gz (54.0 kB view details)

Uploaded Source

Built Distribution

kryptor-0.4.0-py3-none-any.whl (43.2 kB view details)

Uploaded Python 3

File details

Details for the file kryptor-0.4.0.tar.gz.

File metadata

  • Download URL: kryptor-0.4.0.tar.gz
  • Upload date:
  • Size: 54.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for kryptor-0.4.0.tar.gz
Algorithm Hash digest
SHA256 13e43c5ae29301e9c1d7ef05a039bb42161d62504ae4a6c1e50e201486c42584
MD5 c686ffa1573f76fe9d5806eb41473d12
BLAKE2b-256 4f433c8eb2aeba852cf86fc4e3dd2d2d25b711efeca3168e427100a92309a347

See more details on using hashes here.

File details

Details for the file kryptor-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: kryptor-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 43.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for kryptor-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28b45609aa50065059f1c015cad506670bf0b7226a6f72b9fc0a773480d8cec4
MD5 6ffbc92ae84cd7a2fbd74319c62d9ad0
BLAKE2b-256 024e8fad2d2e7c2522d92784f0b37b58fbd8a17cbd4a911636603411ba9d6af1

See more details on using hashes here.

Supported by

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