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