After some testing I determined that if I go beyond 56 characters that I am encrypting then decrypting , that is where it fails ( on the decrypt ) . Does this have something to do with DES being 56bit ?
I think I may have figured it out. When writing the encrypted value to a file if it's too long it is putting a line break/carriage return into the string and then when it tries to decrypt the line ( which is now stored as 2 lines ) it doesn't match and thus won't work.
Here is the code that is doing the writing to the file. Hopefully someone can notice something I have missed which would cause line breaks within the encrypted text.