I just adapted https://github.com/phpseclib/phpseclib/blob/master/tests/Crypt/Hash/TestCase.php#L12