File tree Expand file tree Collapse file tree 5 files changed +19
-8
lines changed
Expand file tree Collapse file tree 5 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 11# Caeser Cipher Encryption and Decryption Tool
22
3+ from colorama .ansi import Fore
34from extras import decor
45import time
56from option_validator import options
67from redo import redo
8+ from colours import print_with_color
79
10+ time .sleep (1 )
811@decor
912def display ():
10- print (" CAESAR CIPHER ALGORITHM" )
13+ print_with_color (" CAESAR CIPHER ALGORITHM" , color = Fore . BLUE )
1114
1215display ()
1316
Original file line number Diff line number Diff line change 11# Decryption algorithm
2+ from colorama .ansi import Fore
3+ from colours import print_with_color
24import time
35from extras import decor
46
57@decor
68def intro ():
79 time .sleep (1 )
8- print (" Welcome To Caesar Cipher Decryptor" )
10+ print_with_color (" Welcome To Caesar Cipher Decryptor" , color = Fore . GREEN )
911
1012def note ():
1113 print ()
12- print ("NOTE: YOU ALWAYS NEED TO HAVE THE SAME KEY USED TO ENCRYPT THE TEXT!" )
14+ print_with_color ("NOTE: YOU ALWAYS NEED TO HAVE THE SAME KEY USED TO ENCRYPT THE TEXT!" , color = Fore . RED )
1315
1416def caesar_decryption (ciphertext , key ):
1517 decrypted_str = ""
Original file line number Diff line number Diff line change 11# Encryption algorithm
2+ from colorama .ansi import Fore
3+ from colours import print_with_color
24import time
35from extras import decor
46
57@decor
68def intro ():
79 time .sleep (1 )
8- print (" Welcome To Caesar Cipher Encryptor" )
10+ print_with_color (" Welcome To Caesar Cipher Encryptor" , color = Fore . GREEN )
911
1012def note ():
1113 print ()
12- print ("NOTE: ALWAYS REMEMBER TO KEEP THE KEY SECURE! YOU NEED THE SAME KEY TO DECRYPT THE TEXT!" )
14+ print_with_color ("NOTE: ALWAYS REMEMBER TO KEEP THE KEY SECURE! YOU NEED THE SAME KEY TO DECRYPT THE TEXT!" , color = Fore . RED )
1315
1416def caesar_encryption (plaintext , key ):
1517 encrypted_str = ""
Original file line number Diff line number Diff line change 1+ from colorama .ansi import Fore
2+ from colours import print_with_color
13import sys
24import time
35from os import system , name
46
57def decor (func ):
68 def wrap ():
7- print ("[=======================================]" )
9+ print_with_color ("[=======================================]" , color = Fore . CYAN )
810 func ()
9- print ("[=======================================]" )
11+ print_with_color ("[=======================================]" , color = Fore . CYAN )
1012 return wrap
1113
1214def load_a ():
Original file line number Diff line number Diff line change 1+ from colorama .ansi import Fore , Style
2+ from colours import print_with_color
13import time
24from option_validator import options
35from extras import clear
46
57def redo ():
68 clear ()
7- print ('*******************************' )
9+ print_with_color ('*******************************' , color = Fore . BLUE , brightness = Style . BRIGHT )
810 print ('What would you like to do next?' )
911 time .sleep (1 )
1012 print ('\n 1. Encrypt another' )
You can’t perform that action at this time.
0 commit comments