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:----Kdqdz+MqXT8lyDcC7qGZKg3WirdOPNSrWV7zt6B7TnoO0uF0UWKQ9cLw9d7F8v/5Mf+j1Wu1bXcRXkFCeIXi8fMWfl7RSiKLLwtkQJ6AuPXTi8mwUJd27ETbBw57u+PipJM0N6y3cSnTGy8d8tPjp2r9YEHsQjCPvl37KeABUAE4PJZuZWueLZsc8jiRO0oKpgMrQrtPzY6nYcN5yK3AjRqfPBWaMpTadwpbC6n76BLdscRXcAAWD5k9DxmR25wI0L4izy2ghYJo/4J/UylhRkaK5Fn2rCH+6QlSkPSZWmTJ9SRy+tD0sgN0eyOf0pxkkJF7Xqx19jINpbSAmJyo/ZmBeaP9tkq5Pb0DgrkgLHRzNlFd6fbkkiKk77GYFz+iwPiygzI9kaHWk2I3l73AGtVlBtGq2ey5aq1fDRBUwBxPCpdud023ktjK2fUMf8soNufqi2adxUilloGeLJ1vWCe/GdTxRsFTqHm52GEHWeZwlIQ4QJHbHcCYgbuxHWT5BjqteY8thkAcRByNer7VVPUdJuKJOLnB+TL8EB09BT+VHdh1lfEKWw2dy3qaBcST8bGOO6oHDxkqwMuXHQRiwHW9pdUE9sE/bcM1qcSM7CDFHfDkMAAGjR4qXPzHZRDDvg04L3P5ZGBv0jlw8L87I4G/MHDlIStTGpnp9K4foBs=----ATTACHMENT:----MzgzOTE5NDkyOTM5MDQyNyA0NjkxNzI1NzI0Nzc4NzY1IDg3MTIwNjAwMTk1NjA3MA==