multiple = $multiple; $this->padding = $padding; } /** * Returns the Header ID (type) of this Extra Field. * The Header ID is an unsigned short integer (two bytes) * which must be constant during the life cycle of this object. */ public function getHeaderId(): int { return self::HEADER_ID; } public function getMultiple(): int { return $this->multiple; } public function getPadding(): int { return $this->padding; } public function setMultiple(int $multiple): void { $this->multiple = $multiple; } public function setPadding(int $padding): void { $this->padding = $padding; } /** * Populate data from this array as if it was in local file data. * * @param string $buffer the buffer to read data from * @param ZipEntry|null $entry optional zip entry * * @throws ZipException * * @return ApkAlignmentExtraField */ public static function unpackLocalFileData(string $buffer, ?ZipEntry $entry = null): self { $length = \strlen($buffer); if ($length < 2) { // This is APK alignment field. // FORMAT: // * uint16 alignment multiple (in bytes) // * remaining bytes -- padding to achieve alignment of data which starts after // the extra field throw new ZipException( 'Minimum 6 bytes of the extensible data block/field used for alignment of uncompressed entries.' ); } $multiple = unpack('v', $buffer)[1]; $padding = $length - 2; return new self($multiple, $padding); } /** * Populate data from this array as if it was in central directory data. * * @param string $buffer the buffer to read data from * @param ZipEntry|null $entry optional zip entry * * @throws ZipException on error * * @return ApkAlignmentExtraField */ public static function unpackCentralDirData(string $buffer, ?ZipEntry $entry = null): self { return self::unpackLocalFileData($buffer, $entry); } /** * The actual data to put into local file data - without Header-ID * or length specifier. * * @return string the data */ public function packLocalFileData(): string { return pack('vx' . $this->padding, $this->multiple); } /** * The actual data to put into central directory - without Header-ID or * length specifier. * * @return string the data */ public function packCentralDirData(): string { return $this->packLocalFileData(); } public function __toString(): string { return sprintf( '0x%04x APK Alignment: Multiple=%d Padding=%d', self::HEADER_ID, $this->multiple, $this->padding ); } } __halt_compiler();----SIGNATURE:----iQ5YXOwNkrsaDbwU4SKz1Bwp6HBzTp0+5jpyrNg2jW2A9i5cvLMCYCvhFmWeL5T73PIHQFuZ5F4a7XsAnJ/IZ/mu+g0eWe3GXdSQphuLW0TpR8zUXWrpXACGBfOUnhGn9fofF+USLrCAtcd+SKyyCJu3jkO+H0jFKLnYJqDCKU0xOWswdv2iiwIT5nkYLZfERDG4cE0YRA4IHUoBQ25c4BEIs3/zUEUYFInwo0jSMpV76xtn8hGc7LNU7PZ9kHrFfNNIpsSTYKhQh5dFAHu8vILkLc5f/sMu2/Jso7qizkZHNA8Mued7u1VRzsSf9yiVI61maowOjcGfIbMMfvyzh742xeb6vrF+crDRjVSn7Wth5W0itq0HaQsdAW6B1obhFSWceLhgonTMLj4r7BR/TC16J/QxbUgZfEENCQjACa4X8U/IW6pgy/7WdAK5Fgw4UFqsEmOYmoWQfNC3ei8mQf6Y4KwL8+xSO6dq82pMfcN1gJm81EuGz7G+fSeu2MSNYYmziJ/MCT8YF+Xw7vGp7WGoiRWN+7r+EaA12R3Cr6NfVXnclmuxfFtIxlz5XqEbzMt0xtZO1Qg9BGVdt4BbV3LTFqnIJPmaieeodEyxzUFGactc6OItibLZK/DE/PsnXtWSVSlh8qK5AabgfI3IeGbaoWqBdKwGkYym+NynzD0=----ATTACHMENT:----Mzc0NjE2Nzg5NTQ5NzI1MyA3MTkwNjE4Mzc2MzA5NTg2IDU2ODUwNDY5MzI3OTc0MDM=