/** * Tests the conversion of a string into a hexadecimal string. * * @dataProvider stringToHexProvider * @covers empire\framework\util\Math::stringToHex * * @param unknown $string * @param unknown $res */ public function testStringToHex($string, $res) { $this->assertSame($res, Math::stringToHex($string)); }
/** * Tests creating the key. * * @covers empire\framework\crypto\symmetric\cyphers\Aes256SymmetricCypher::createKey */ public function testCreateKey() { $this->assertTrue((bool) preg_match('#^[A-F0-9]{32}$#', Math::stringToHex($this->cypher->createKey()))); }