Skip to content

Commit b3f434f

Browse files
committed
Added the banner
1 parent ad79ee2 commit b3f434f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

ciphers/caesar_cipher.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
from __future__ import annotations
22
from string import ascii_letters
33
import os
4-
5-
def show_banner(text="CaesarCipher", font="block"):
6-
f = Figlet(font=font)
7-
print(f.renderText(text))
8-
4+
import pyfiglet
95
def encrypt(input_string: str, key: int, alphabet: str | None = None) -> str:
106
"""
117
encrypt
@@ -270,7 +266,10 @@ def brute_force(input_string: str, alphabet: str | None = None) -> dict[int, str
270266
if __name__ == "__main__":
271267
while True:
272268
os.system('cls' if os.name == 'nt' else 'clear')
269+
banner = pyfiglet.figlet_format("Caesar Ciphar", font="big")
270+
print(banner)
273271
print(f"\n{'-' * 10}\n Menu\n{'-' * 10}")
272+
print("Please select from the following options: ")
274273
print(*["1.Encrypt", "2.Encrypt a File", "3.Decrypt", "4.Decrypt a File", "5.BruteForce", "6.Quit", ], sep="\n")
275274

276275
# get user input

0 commit comments

Comments
 (0)