Nikita Marne
24276
72004863L
ICS
ASSIGNMENT 1 CODE:
from [Link] import DES import
base32hex
def
pad(text):
n = len(text) % 8
return text + (' ' * n)
key = 'Password' plaintext = 'Python is the
Best Language!'
des = [Link](key,
DES.MODE_ECB)
padded_text = pad(plaintext) encrypted_text =
[Link](padded_text) cipher_text =
base32hex.b32encode(encrypted_text)
print("Encrypt:",cipher_text)
print("Decrypt:",[Link](encrypted_text))
OUTPUT: