Here's a small encryption/decryption tool that works based on AES algorithm. No matter how weak your password is, the program converts it to a 32 digits hexadecimal number before encrypting. This is achieved by finding the MD5 hash of the password using hashlib python module. This hash is used to encrypt the file.
The idea in my mind while writing this program was this:
Suppose a cracker gets an encrypted file and he figures out it's encrypted using AES somehow. Then he starts brute force attack on it to find the key and extract information. If the password used to encrypt that file is weak and if it's based on a dictionary word, the cracker can easily figure out the password. Hence the password given by the user must be made stronger by the encrypting program. And the best way to make a password strong is by using digest algorithms since it's unique to a string.
What do you think? Am I wrong? Thank you :)