1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-14 10:07:32 +01:00
phpseclib/tests/Unit/Crypt/Hash/SHA256_96Test.php
2020-12-12 22:15:40 -06:00

37 lines
811 B
PHP

<?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;
if (version_compare(PHP_VERSION, '7.0', '>=')) {
require 'SHA256Test.php';
}
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));
}
}