====== PHP RFC: Deprecate always `1` MCRYPT_* constants ====== * Version: 0.9 * Date: 2023-03-04 * Author: - * Status: Withdrawn, replaced by https://wiki.php.net/rfc/deprecations_php_8_3 * Implementation: https://github.com/php/php-src/pull/10773 ===== Introduction ===== `CRYPT_*` constants do not currently provide any value. Since PHP 5.6 their value is hardcoded to `1`. Historically, they were used to signal a hash algo is supported, but as of PHP 5.6, all algos are required to be present by the configure script. If any new crypt algo will be added in the future, semver (PHP minor version) is enough for the developer to test the availability. Removing unuseful constants is welcomed to reduce the engine startup time and binary/memory size. ===== Proposal ===== Deprecate `CRYPT_STD_DES`, `CRYPT_EXT_DES`, `CRYPT_MD5`, `CRYPT_BLOWFISH`, `CRYPT_SHA256`, `CRYPT_SHA512` constants in PHP 8.3 and remove them in PHP 9.0 ===== Backward Incompatible Changes ===== Implied by the proposal. No opcache/sapi change needed. ===== Proposed PHP Version(s) ===== PHP 8.3 ===== Proposed Voting Choices ===== Deprecate `MCRYPT_*` constants in PHP 8.3. (yes/no) Remove `MCRYPT_*` constants in PHP 9.0. (yes/no)