1
0
mirror of https://github.com/danog/phpseclib.git synced 2025-01-22 04:51:19 +01:00
phpseclib/tests/Unit/Crypt/Hash/SHA256_96Test.php

31 lines
708 B
PHP
Raw Normal View History

2014-08-10 02:01:21 -05:00
<?php
/**
* @author Andreas Fischer <bantu@phpbb.com>
* @copyright 2014 Andreas Fischer
2014-08-10 02:01:21 -05:00
* @license http://www.opensource.org/licenses/mit-license.html MIT License
*/
class Unit_Crypt_Hash_SHA256_96Test extends Unit_Crypt_Hash_SHA256Test
{
public function getInstance()
{
return new Crypt_Hash('sha256-96');
}
2014-08-10 11:52:31 -05:00
/**
2015-03-29 17:07:17 +01:00
* @dataProvider hashData()
*/
2014-08-10 11:52:31 -05:00
public function testHash($message, $longResult)
2014-08-10 02:01:21 -05:00
{
2014-08-10 11:52:31 -05:00
parent::testHash($message, substr($longResult, 0, 24));
2014-08-10 02:01:21 -05:00
}
2014-08-10 11:52:31 -05:00
/**
2015-03-29 17:07:17 +01:00
* @dataProvider hmacData()
*/
2014-08-10 11:52:31 -05:00
public function testHMAC($key, $message, $longResult)
2014-08-10 02:01:21 -05:00
{
parent::testHMAC($key, $message, substr($longResult, 0, 24));
2014-08-10 02:01:21 -05:00
}
}