Skip to content

jamespolley/classical-ciphers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Classical Ciphers

Encoders and Decoders for Famous Ciphers in the History of Cryptography - Created by jamespolley

Description

This Python package includes encoder and decoder algorithms for the following ciphers:

  • Caesar
  • ROT13
  • Trithemius
  • Vigenere

Usage

e.g. Caesar Cipher (others work in a similar way)

import caesar


message_to_encode = "This is an example of the Caesar Cipher, encoded with an offset of five."

encoded_message = caesar.encode(message_to_encode, 5)

print(encoded_message)

# Prints "Ocdn dn vi zsvhkgz ja ocz Xvznvm Xdkczm, zixjyzy rdoc vi jaanzo ja adqz."

decoded_message = caesar.decode(encoded_message, 5)

print(decoded_message)

# Prints "This is an example of the Caesar Cipher, encoded with an offset of five."

For a usage example of each cipher, see examples.py

About

Encoders and decoders for famous ciphers in the history of cryptography.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages