I would like to use salt with more than 24 characters with mcrypt.
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));
However, if I make $ salt more than 24 characters, it gives this warning and uses truncated salt with 24 characters:
Warning: mcrypt_encrypt () [function.mcrypt-encrypt]: the key size is too large for this algorithm
Is there any way around this?
source share