2014-08-10 07:01:21 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @author Andreas Fischer <bantu@phpbb.com>
|
2014-12-09 23:02:44 +00:00
|
|
|
* @copyright 2014 Andreas Fischer
|
2014-08-10 07:01:21 +00: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 16:52:31 +00:00
|
|
|
/**
|
|
|
|
* @dataProvider hashData()
|
|
|
|
*/
|
|
|
|
public function testHash($message, $longResult)
|
2014-08-10 07:01:21 +00:00
|
|
|
{
|
2014-08-10 16:52:31 +00:00
|
|
|
parent::testHash($message, substr($longResult, 0, 24));
|
2014-08-10 07:01:21 +00:00
|
|
|
}
|
|
|
|
|
2014-08-10 16:52:31 +00:00
|
|
|
/**
|
|
|
|
* @dataProvider hmacData()
|
|
|
|
*/
|
|
|
|
public function testHMAC($key, $message, $longResult)
|
2014-08-10 07:01:21 +00:00
|
|
|
{
|
2014-08-10 20:18:51 +00:00
|
|
|
parent::testHMAC($key, $message, substr($longResult, 0, 24));
|
2014-08-10 07:01:21 +00:00
|
|
|
}
|
|
|
|
}
|