md5 outputs a 128 bit (16 byte) hash, while 3DES takes a 168 bit (21 byte) key. I would suspect that passing an md5 hash into your encryption and/or decryption algorithm is causing some padding to take place along the way.
It would be better to either use SHA256 (which outputs a 256 bit hash) and truncate the output to 168 bits, or use AES-256 instead of 3DES with the full 256 bit hash as the key. Even better than that would be to use a proper key derivation function like PBKDF2 to create a key from a string password.