Mcrypt is a replacement of Unix‘s popular command crypt. It is a file encryption tool. Mcrypt uses modern algorithms for encrypting. Hence it is considered as secure and safe. To encrypt a string, Mcrypt requires a key to encrypt and decrypt. This key have a critical role in encryption and decryption. In this post I’ll be giving out two functions that will encrypt and decrypt based on a key.
The Key
We should use the same key for both encryption and decryption. Note that the key length should not exceed 25 characters.
... [READ MORE]