IS Lab 1 - Progress So Far
This commit is contained in:
		
							parent
							
								
									518399472f
								
							
						
					
					
						commit
						98942630b6
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,6 @@
 | 
			
		|||
def print_mat(hk):
 | 
			
		||||
def hill_en(ptext,hk):
 | 
			
		||||
 | 
			
		||||
def hill_de(ptext,hk):
 | 
			
		||||
 | 
			
		||||
def main():
 | 
			
		||||
    ptext = input("Kindly enter your desired plaintext: ")
 | 
			
		||||
| 
						 | 
				
			
			@ -6,7 +8,7 @@ def main():
 | 
			
		|||
 | 
			
		||||
    print("Welcome to the Hill cipher.")
 | 
			
		||||
    print("Plaintext: ", ptext)
 | 
			
		||||
    print("Hill Key: ", print_mat(hk))
 | 
			
		||||
    print("Hill Key: ", hk)
 | 
			
		||||
    ctext = hill_en(ptext, hk)
 | 
			
		||||
    print("Ciphertext: ", ctext)
 | 
			
		||||
    decrypted_text = hill_de(ctext, hk)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue