diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-01-11 20:05:30 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-01-11 20:06:30 +0100 |
commit | 876fb83ddcf7ae6c1b63e7d7a1636893c52284b6 (patch) | |
tree | 69b862da6255199689b9cfc3fc3f232da9977d99 /tests | |
parent | 98c4951f458f398c022bf928ff17b106a7901428 (diff) | |
download | nextcloud-server-876fb83ddcf7ae6c1b63e7d7a1636893c52284b6.tar.gz nextcloud-server-876fb83ddcf7ae6c1b63e7d7a1636893c52284b6.zip |
getMediumStrengthGenerator is deprecated and does not do anything anymore
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/dbschema.php | 2 | ||||
-rw-r--r-- | tests/lib/security/securerandom.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/dbschema.php b/tests/lib/dbschema.php index d96f8195770..11eacbf397f 100644 --- a/tests/lib/dbschema.php +++ b/tests/lib/dbschema.php @@ -26,7 +26,7 @@ class Test_DBSchema extends \Test\TestCase { $dbfile = OC::$SERVERROOT.'/tests/data/db_structure.xml'; $dbfile2 = OC::$SERVERROOT.'/tests/data/db_structure2.xml'; - $r = '_' . \OC::$server->getSecureRandom()->getMediumStrengthGenerator()-> + $r = '_' . \OC::$server->getSecureRandom()-> generate(4, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS) . '_'; $content = file_get_contents( $dbfile ); $content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content ); diff --git a/tests/lib/security/securerandom.php b/tests/lib/security/securerandom.php index 5eede9a30fb..526066d92ee 100644 --- a/tests/lib/security/securerandom.php +++ b/tests/lib/security/securerandom.php @@ -51,7 +51,7 @@ class SecureRandomTest extends \Test\TestCase { * @dataProvider stringGenerationProvider */ function testMediumLowStrengthGeneratorLength($length, $expectedLength) { - $generator = $this->rng->getMediumStrengthGenerator(); + $generator = $this->rng; $this->assertEquals($expectedLength, strlen($generator->generate($length))); } @@ -67,7 +67,7 @@ class SecureRandomTest extends \Test\TestCase { * @dataProvider charCombinations */ public function testScheme($charName, $chars) { - $generator = $this->rng->getMediumStrengthGenerator(); + $generator = $this->rng; $scheme = constant('OCP\Security\ISecureRandom::' . $charName); $randomString = $generator->generate(100, $scheme); $matchesRegex = preg_match('/^'.$chars.'+$/', $randomString); |