in reply to Crypt::DES returns same string

Use Crypt::CBC. It will automatically add a random IV to your message when you encrypt, so the same message won't encrypt to the same ciphertext. When you decrypt, it will automatically strip the IV and padding off the message. It also works with many different Crypt:: modules, so you can easily switch to a different cipher if you decide DES's 56-bit key is too short.