I am trying to encrypt a password using mcrypt_encrypt(). It shows a waing mcrypt waing : key of size 22 not supported by this algorithm. only key of size 16,24 or 32 supported. It is working on localhost. But when goes to online is shows a waing error.
My code to encrypt is
$text="thisismypassword123";
$salt="1234567824";
retu trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $salt, $text, MCRYPT_MODE_ECB,
mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));
what i have to do?
