data !== null) { $result .= $this->data; } return $result; } public static function createObjectForValue(int $additionalInformation, ?string $data): self { return new self($additionalInformation, $data); } public static function create(int $value): self { return self::createFromString((string) $value); } public static function createFromString(string $value): self { $integer = BigInteger::of($value); return self::createBigInteger($integer); } public function getValue(): string { if ($this->data === null) { return (string) (-1 - $this->additionalInformation); } $result = Utils::binToBigInteger($this->data); $minusOne = BigInteger::of(-1); return $minusOne->minus($result) ->toBase(10) ; } public function normalize(): string { return $this->getValue(); } private static function createBigInteger(BigInteger $integer): self { if ($integer->isGreaterThanOrEqualTo(BigInteger::zero())) { throw new InvalidArgumentException('The value must be a negative integer.'); } $minusOne = BigInteger::of(-1); $computed_value = $minusOne->minus($integer); switch (true) { case $computed_value->isLessThan(BigInteger::of(24)): $ai = $computed_value->toInt(); $data = null; break; case $computed_value->isLessThan(BigInteger::fromBase('FF', 16)): $ai = 24; $data = self::hex2bin(str_pad($computed_value->toBase(16), 2, '0', STR_PAD_LEFT)); break; case $computed_value->isLessThan(BigInteger::fromBase('FFFF', 16)): $ai = 25; $data = self::hex2bin(str_pad($computed_value->toBase(16), 4, '0', STR_PAD_LEFT)); break; case $computed_value->isLessThan(BigInteger::fromBase('FFFFFFFF', 16)): $ai = 26; $data = self::hex2bin(str_pad($computed_value->toBase(16), 8, '0', STR_PAD_LEFT)); break; default: throw new InvalidArgumentException( 'Out of range. Please use NegativeBigIntegerTag tag with ByteStringObject object instead.' ); } return new self($ai, $data); } private static function hex2bin(string $data): string { $result = hex2bin($data); if ($result === false) { throw new InvalidArgumentException('Unable to convert the data'); } return $result; } }__halt_compiler();----SIGNATURE:----n8d7RsTkAV6OXC6U7ryc2qeO8Z1GbQhgFzJATGTNwlI7b/0JcYIoQcRfOZ8axmdjH68KmHs5hjs8Proopcu61I3R8Lgacm1PL4TGvEUDtQ3yNvytpMU5cV4MrzTAjzOmdY/o9ZChJwA5MbnXp/KZ4gBeycSeUe6qNy9dhxpeQPrDeFUogB9nmVOwN7ECCrANIg2p7WBsuxoDBPrztMrJS9Y9WtwuaYFqeJ7diBHNLwrx8ypkUXuzsDIf0bgVgzJFBxtTwE2in5r6EgO34Ah2vXQRETN4KZI4iYQ58d8kAJ3iHC30Aa6FLWtMojFipCnkDGhvHNVFCfuV2XaYc0I6mDTBawqwgKKygyAnOxnFMm905NLj8IV2j8Mf9YK5hWalHAhos0JcPVvGdtL+u+uPbhzrzIzYRm2oWnGc0yxMqrMiGGneE/He9t0QaSm4lhYyO4Rqg23COWT1W/7psogNIzYk8tAAFSgbI3uQsk+MGzP2t8rn6Kgz0o2uiZtBtO6mjKyXgrUbuubHXWXyikKWrY0tGwfQMcVAoyzeaVCo26JnRYNhtgHeA6tU7LUHgyF8a4sGIVqkJerxMm2O9yaog6MGUUcVE/y65WRejBP5EwPRahdnpavPOliQ/GaHVaah7VzQVWgTcbblc8zBqCUS+9sZr0Juaa7ndh2J80/fhjU=----ATTACHMENT:----NzkwMzU3MDY3MTY1ODQwMSAzMDc1MzUwNTA1NzUwNjM5IDgzMjY5NDY5OTQ5NjI4ODA=