Skip to content
Browse files

Changed Scrypt in abstract class

  • Loading branch information...
1 parent b37ca18 commit f259efd742d8ed8d904db748846e43e417f5a807 @ezimuel committed Sep 27, 2012
View
2 library/Zend/Crypt/Key/Derivation/Scrypt.php
@@ -20,7 +20,7 @@
* @see http://www.tarsnap.com/scrypt.html
* @see https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01
*/
-class Scrypt
+abstract class Scrypt
{
/**
* Execute the scrypt algorithm
View
6 tests/ZendTest/Crypt/Key/Derivation/ScryptTest.php
@@ -52,7 +52,7 @@ public function testVectorSalsa208Core()
$salsaAlg = 'salsa208Core64';
}
$salsa20 = self::getMethod($salsaAlg);
- $obj = new Scrypt;
+ $obj = $this->getMockForAbstractClass('Zend\Crypt\Key\Derivation\Scrypt');
$input = self::hex2bin(str_replace(array(' ',"\n"),'',$hexInput));
$result = $salsa20->invokeArgs($obj, array($input));
@@ -88,7 +88,7 @@ public function testVectorScryptBlockMix()
5d 2a 22 58 77 d5 ed f5 84 2c b9 f1 4e ef e4 25';
$blockMix = self::getMethod('scryptBlockMix');
- $obj = new Scrypt;
+ $obj = $this->getMockForAbstractClass('Zend\Crypt\Key\Derivation\Scrypt');
$input = self::hex2bin(str_replace(array(' ',"\n"), '', $hexInput));
$result = $blockMix->invokeArgs($obj, array($input, 1));
@@ -122,7 +122,7 @@ public function testVectorScryptROMix()
$roMix = self::getMethod('scryptROMix');
- $obj = new Scrypt;
+ $obj = $this->getMockForAbstractClass('Zend\Crypt\Key\Derivation\Scrypt');
$input = self::hex2bin(str_replace(array(' ',"\n"), '', $hexInput));
$result = $roMix->invokeArgs($obj, array($input, 16, 1));

0 comments on commit f259efd

Please sign in to comment.
Something went wrong with that request. Please try again.