mcrypt is deprecated, what is the alternative?
<p>The mcrypt-extension is <a href="http://php.net/manual/en/migration71.deprecated.php#migration71.deprecated.ext-mcrypt" rel="noreferrer">deprecated</a> will be removed in PHP 7.2 according to the comment posted <a href="https://bugs.php.net/bug.php?id=73734" rel="noreferrer">here</a>. So I am looking for an alternative way to encrypt passwords.</p>

<p>Right now I am using something like</p>

<pre><code>mcrypt_encrypt(MCRYPT_RIJNDAEL_128, md5($key, true), $string, MCRYPT_MODE_CBC, $iv)
</code></pre>

<p>I need your opinion for the best/strongest way to encrypt passwords, the encrypted password should of course supported by PHP 7.xx and should also be decryptable because my customers do want to have an option to 'recover' their passwords without generating a new one. </p>