I have searched forums for this and didn't find any answer.
I want an encryption algorithm with the following requirements:
1) It can be decrypted and should have the key feature like mcrypt function.
2) I also want that if the string to be encrypted is 9 chars long then encrypted string should also be 9 chars long.
3) String input should result in string output and integer inputs should result in integer outputs.
MD5 and mcrypt both doesn't support length feature.
Following is the link that meet most of my requierments but not very secure.
http://www.hansanderson.com/php/crypto/
Regards,
Atiq