Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
metropolite
/
wp-content
/
plugins
/
mycryptocheckout
/
vendor
/
mdanter
/
ecc
/
tests
/
unit
/
Random
:
HmacRandomNumberGeneratorTest.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Mdanter\Ecc\Tests\Random; use Mdanter\Ecc\EccFactory; use Mdanter\Ecc\Crypto\Key\PrivateKey; use Mdanter\Ecc\Random\HmacRandomNumberGenerator; use Mdanter\Ecc\Tests\AbstractTestCase; class HmacRandomNumberGeneratorTest extends AbstractTestCase { /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Unsupported hashing algorithm */ public function testRequireValidAlgorithm() { $math = EccFactory::getAdapter(); $g = EccFactory::getNistCurves()->generator192(); $privateKey = new PrivateKey($math, $g, gmp_init(1, 10)); $hash = gmp_init(hash('sha256', 'message', false), 16); new HmacRandomNumberGenerator($math, $privateKey, $hash, 'sha256aaaa'); } }