mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 02:07:09 +00:00
Merge branch '2.0' into 3.0
This commit is contained in:
commit
b44a59091a
@ -14,7 +14,7 @@ use phpseclib3\Crypt\DSA\PrivateKey;
|
||||
/**
|
||||
* @requires PHP 7.0
|
||||
*/
|
||||
class Unit_Crypt_DSA_CreateKeyTest extends PhpseclibTestCase
|
||||
class Unit_Crypt_DSA_CreateKeyTestDSA extends PhpseclibTestCase
|
||||
{
|
||||
public function testCreateParameters()
|
||||
{
|
||||
|
32
tests/Unit/Crypt/Hash/SHA256_96Test.php
Normal file
32
tests/Unit/Crypt/Hash/SHA256_96Test.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Andreas Fischer <bantu@phpbb.com>
|
||||
* @copyright 2014 Andreas Fischer
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
*/
|
||||
|
||||
use phpseclib\Crypt\Hash;
|
||||
|
||||
class Unit_Crypt_Hash_SHA256_96Test extends Unit_Crypt_Hash_SHA256Test
|
||||
{
|
||||
public function getInstance()
|
||||
{
|
||||
return new Hash('sha256-96');
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider hashData()
|
||||
*/
|
||||
public function testHash($message, $longResult)
|
||||
{
|
||||
parent::testHash($message, substr($longResult, 0, 24));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider hmacData()
|
||||
*/
|
||||
public function testHMAC($key, $message, $longResult)
|
||||
{
|
||||
parent::testHMAC($key, $message, substr($longResult, 0, 24));
|
||||
}
|
||||
}
|
32
tests/Unit/Crypt/Hash/SHA512_96Test.php
Normal file
32
tests/Unit/Crypt/Hash/SHA512_96Test.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Andreas Fischer <bantu@phpbb.com>
|
||||
* @copyright 2014 Andreas Fischer
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
*/
|
||||
|
||||
use phpseclib\Crypt\Hash;
|
||||
|
||||
class Unit_Crypt_Hash_SHA512_96Test extends Unit_Crypt_Hash_SHA512Test
|
||||
{
|
||||
public function getInstance()
|
||||
{
|
||||
return new Hash('sha512-96');
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider hashData()
|
||||
*/
|
||||
public function testHash($message, $longResult)
|
||||
{
|
||||
parent::testHash($message, substr($longResult, 0, 24));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider hmacData()
|
||||
*/
|
||||
public function testHMAC($key, $message, $longResult)
|
||||
{
|
||||
parent::testHMAC($key, $message, substr($longResult, 0, 24));
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ use phpseclib3\Crypt\RSA\Formats\Keys\PKCS1;
|
||||
use phpseclib3\Crypt\RSA\PrivateKey;
|
||||
use phpseclib3\Crypt\RSA\PublicKey;
|
||||
|
||||
class Unit_Crypt_RSA_CreateKeyTest extends PhpseclibTestCase
|
||||
class Unit_Crypt_RSA_CreateKeyTestRSA extends PhpseclibTestCase
|
||||
{
|
||||
public function testCreateKey()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user