.. _security-avoidthosecrypto: .. _avoid-those-hash-functions: Avoid Those Hash Functions ++++++++++++++++++++++++++ The following cryptography algorithms are considered insecure, and should be replaced with new and more modern algorithms. ``MD2``, ``MD4``, ``MD5``, ``SHA0``, ``SHA1``, ``CRC``, ``DES``, ``3DES``, ``RC2``, ``RC4``. When possible, avoid using them, may it be as PHP functions, or hashing function configurations (mcrypt, hash...). Weak cryptography is commonly used for hashing values when caching them. In such cases, security is not a primary concern. However, it may later become such, when hackers get access to the cache folders, or if the cached identifier is published. As a preventive protection, it is recommended to always use a `secure `_ hashing function. .. code-block:: php See also `Secure Hash Algorithms `_. Connex PHP features ------------------- + `hash `_ Suggestions ___________ * Keep the current crypto, and add a call to a stronger one. * Change the crypto for a more modern one and update the related databases Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Security/AvoidThoseCrypto | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Security ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Major | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+