You're right. I was using count($keySizes) and thought !empty($keySizes) would be clearer and missed the '!'. Crypt::getKeySize() already has the max key size, same as what mcrypt_module_get_algo_key_size() would return.