PHP Unknown: Function mcrypt_decrypt() is deprecated
Here is my function after run it got error
any one who know about this can you help me for fix this
public static function encryptIt( $q ) { /* * This Function Encrypt the md5 string to orignal string * @param you should pass orignal string to use this function * @return MD5 Encrypted string * @writer Manish Garg */ $cryptKey = 'qJB0rGtIn5UB1xG03efyCp'; $qEncoded = base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), $q, MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ) ); return( $qEncoded ); }
public static function decryptIt( $q ) { /* * This Function Decrypt the md5 string to orignal string * @param you should pass orignal string to use this function * @return MD5 Decrypted string * @writer Manish Garg */ $cryptKey = 'qJB0rGtIn5UB1xG03efyCp'; $qDecoded = rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), base64_decode( $q ), MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ), "\0"); return( $qDecoded ); }
Share