Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 582 Bytes

README.md

File metadata and controls

36 lines (22 loc) · 582 Bytes

Crypto Python

A python package for Encryption/Decryption

Crypto Algorithms

  • Caeser Cipher
  • Substitution Cipher
  • Deffie-Hellman Key Exchange

How to use

Caeser Cipher
from cp.<caeser,substitution> import encrypt,decrypt

plaintext = "Hello World"

ciphertext = encrypt(plaintext,key=1)
plaintext = decrypt(ciphertext,key=1)
Substitution Cipher
from cp.substitution import encrypt,decrypt,generate_key

plaintext = "Hello World"

key = generate_key()
ciphertext = encrypt(plaintext,key)
plaintext = decrypt(ciphertext,key)