Skip to content

miguelcasanas/encryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple encryption algorithms

Related article: https://bit.ly/3WfKXWK

Contents

  • Caesar cipher
  • Vigenère cipher
  • Bitwise rotation
  • XOR encryption

Usage

Replace 'cipher' for the appropriate word.

To encrypt:

python3 cipher.py file_to_encrypt key

To decrypt, use the '-d' flag (not necessary when using xor.py):

python3 cipher.py -d file_to_decrypt key

Optionally, you can specify the output file with '-o':

python3 cipher.py file_to_encrypt key -o output_file

To see the help use '-h':

python3 cipher.py -h

Alternatively, you can import the individual functions to play with them in your Python programs:

from cipher import cipher

Lastly, the key should be a string in the case of vigenere.py or xor.py, and an integer in the case of caesar.py and bitwise.py.

About

Simple encryption algorithms

Topics

Resources

Stars

Watchers

Forks

Languages