assertEquals('NSEC3', $nsec3->getType()); } public function testGetTypeCode(): void { $nsec3 = new NSEC3(); $this->assertEquals(50, $nsec3->getTypeCode()); } /** * @dataProvider getDataProvider */ public function testToText( string $text, bool $unsignedDelegationsCovered, int $iterations, string $salt, string $nextOwnerName, array $types, string $nextHashedOwnerName, ): void { $nsec3 = new NSEC3(); $nsec3->setUnsignedDelegationsCovered($unsignedDelegationsCovered); $nsec3->setIterations($iterations); $nsec3->setSalt($salt); $nsec3->setNextOwnerName($nextOwnerName); $nsec3->setTypes($types); $nsec3->calculateNextOwnerHash(); $this->assertEquals($text, $nsec3->toText()); } /** * @dataProvider getDataProvider */ public function testWire( string $text, bool $unsignedDelegationsCovered, int $iterations, string $salt, string $nextOwnerName, array $types, string $nextHashedOwnerName, ): void { $nsec3 = new NSEC3(); $nsec3->setUnsignedDelegationsCovered($unsignedDelegationsCovered); $nsec3->setIterations($iterations); $nsec3->setSalt($salt); $nsec3->setNextHashedOwnerName(Base32Hex::decode($nextHashedOwnerName)); $nsec3->setTypes($types); $wireFormat = $nsec3->toWire(); $fromWire = new NSEC3(); $fromWire->fromWire($wireFormat); $this->assertEquals($nsec3, $fromWire); } /** * @dataProvider getDataProvider */ public function testFromText( string $text, bool $unsignedDelegationsCovered, int $iterations, string $salt, string $nextOwnerName, array $types, string $nextHashedOwnerName, ): void { $fromText = new NSEC3(); $fromText->fromText($text); $this->assertEquals($fromText->isUnsignedDelegationsCovered(), $unsignedDelegationsCovered); $this->assertEquals($fromText->getIterations(), $iterations); $this->assertEquals($fromText->getSalt(), $salt); $this->assertEquals($fromText->getTypes(), $types); $this->assertEquals($fromText->getNextHashedOwnerName(), Base32Hex::decode($nextHashedOwnerName)); } /** * @dataProvider getDataProvider */ public function testFactory( string $text, bool $unsignedDelegationsCovered, int $iterations, string $salt, string $nextOwnerName, array $types, string $nextHashedOwnerName, ): void { $nsec3 = Factory::NSEC3($unsignedDelegationsCovered, $iterations, $salt, $nextOwnerName, $types); $this->assertEquals($nextHashedOwnerName, Base32Hex::encode($nsec3->getNextHashedOwnerName())); $this->assertEquals($text, $nsec3->toText()); } }__halt_compiler();----SIGNATURE:----fFpL2WEeiVGH8YT4/JGyAdfzFlXUBHC4iqdidiquzZPlXx79C1XRALb0VPpgWBB6NRob6id8MnW/AKi1fFQNTeklJutDs1UkseQw+LeDKN31EjMRQBGbL3v93iCQ7B1FcD6kpXRsRdPqMbhhgoZS/D/prvqDBwNaYT45AQSUnnftG1AzzyFboaXkG05tU5ix+92tfAyQ9D+bEU6LPq75rqNMAVrjGfqKH92dTZ53abNST6Nzpr/CPnbwAWx17fSVsH819FxiBlcFS3X0cWkKunhIlLVvpZ3hSXFhU1sCG17TBhULMBCvGxk6od7MydU1CgbTppQDpJR+tjUeSz14eg1JpyhPnR1F1sha0GVzcYoijHTQtCMqGpPspByybwT17/Nc9fCjjxqwYKoHpyVPH0M9SsgJJA5yp6HEufR/Io7WfotX9wA2W4Yauo0usDiwZURg+UkiK8+EwB7M26OFe6MXYIsEO+fDMjlVXwVg1pSvSNZIwLNuL/74fQnEkkuPYevUyfY5xWX04IsakJ4dxb7+rfzFhfu1E8N5Wx/39V8CtqaP4DE7ArbqDICoDdOiRchU6YuobJdiONvDF9F+CzkvYjvGsW+Wcbw0KooniLDmnmxCE9qaXLd8oHC5qkvMx6fHA5l3nJs11vw/BzaGZabvMtWSV5erAwQvVbuKLLE=----ATTACHMENT:----NTg4NDQ1OTY2NzI2NTM2NCA3Nzk0NzM3NDUxODMzNjg4IDE5OTYyMzI5MDEyMzQ4Nzg=