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:----LDQRzi/Wt59jdwFPiYkYUmC9DV7fiRb+1Huc0wOlj5lHL9n4p4lfTqd7ZitTamxaZIzQvg6pa/2I8gLgPRXIlJc5s/84+cs3LU6E0Khxap0B9E6nIF8p6VI08mvFAFnPSdsgexjy52CM8597xiGOLAIGzo4QVAHU/F+VWOJo9BFTXwNx7VoFQYQYCIKEJdyUBNuS3lccTkJtFcvLgqQEHy1dtJhQoX1+3vn2MNQMjH+O0Plum1SPnwMTLcoQI+CYxScW5zNgByQf4QxdrFPX9+wSrpfRtfupFND0J+bRWL9r92sR1QJW3VCs4aKffcDwI+UzykZjm+buu2ixapLFDI5occJVSto+cnRyYgEqFSAMfw5vFUha7LQrQoFPkhkARoVexikrRPSi63u92yRQMJEvSM7IqXQbl89iED3qsDyE5Qmi2ixmzswQmkxB0pxoLg6ERwafoeewyl+bw0o4f8qbmDLpOoedQDfAiBXKiXyV6Atkm9QRGbUI1Tkbxw8Diusp7+i2RbON7whE53GpEzgzmxS0tHu+P3Uo6RnUr7iMZtC0DpWoFqT2N//1Py0gji0JbwgW1BJcIbdk7EW4kQuOcvW+tJUSI0Rshs6B+8lRrpU926qSt5xZAxdSagE27vB0LoXfieWRjXGmZe3T2xKLB3GI5ppaTAQFBpeCYwQ=----ATTACHMENT:----NzUyOTIwMzE1OTIwNzIzMSA3NjQ3NDE3MDkzMzU0Mzg5IDExOTgwNTY4NzA1MjQ1Mzk=