This pull request implements the safe string helper methods from \ParagonIE\Halite\Util (essentially as a fork since that library requires PHP 5.6) and utilizes the safeStrlen() method in our JCrypt::timingSafeCompare() method to address the issue raised in #8330.
There are other instances that need to be updated but that can come later.