diff --git a/tests/Unit/Crypt/BlowfishTest.php b/tests/Unit/Crypt/BlowfishTest.php index c523425d..e9bb4c86 100644 --- a/tests/Unit/Crypt/BlowfishTest.php +++ b/tests/Unit/Crypt/BlowfishTest.php @@ -7,6 +7,7 @@ use phpseclib\Crypt\Base; use phpseclib\Crypt\Blowfish; +use phpseclib\Crypt\Random; class Unit_Crypt_BlowfishTest extends PhpseclibTestCase { @@ -118,7 +119,7 @@ class Unit_Crypt_BlowfishTest extends PhpseclibTestCase $plaintext = str_repeat('.', 100); for ($keyLen = 4; $keyLen <= 56; $keyLen++) { - $key = crypt_random_string($keyLen); + $key = Random::string($keyLen); $objects[0]->setKey($key); $ref = $objects[0]->encrypt($plaintext); for ($i = 1; $i < count($objects); $i++) { diff --git a/tests/Unit/Crypt/RC4Test.php b/tests/Unit/Crypt/RC4Test.php index ce16b13f..cc0b4d5c 100644 --- a/tests/Unit/Crypt/RC4Test.php +++ b/tests/Unit/Crypt/RC4Test.php @@ -7,6 +7,7 @@ use phpseclib\Crypt\Base; use phpseclib\Crypt\RC4; +use phpseclib\Crypt\Random; class Unit_Crypt_RC4Test extends PhpseclibTestCase { @@ -239,7 +240,7 @@ class Unit_Crypt_RC4Test extends PhpseclibTestCase $plaintext = str_repeat('.', 100); for ($keyLen = 5; $keyLen <= 256; $keyLen++) { - $key = crypt_random_string($keyLen); + $key = Random::string($keyLen); $objects[0]->setKey($key); $ref = $objects[0]->encrypt($plaintext); for ($i = 1; $i < count($objects); $i++) {