Constants

HEADER_ID

HEADER_ID = 0x9901 : int

DATA_SIZE

DATA_SIZE = 7 : int

VENDOR_ID

VENDOR_ID = 0x4541 : int

VERSION_AE1

VERSION_AE1 = 1 : int

VERSION_AE2

VERSION_AE2 = 2 : int

KEY_STRENGTH_128BIT

KEY_STRENGTH_128BIT = 0x1 : int

KEY_STRENGTH_192BIT

KEY_STRENGTH_192BIT = 0x2 : int

KEY_STRENGTH_256BIT

KEY_STRENGTH_256BIT = 0x3 : int

Properties

$allowVendorVersions

$allowVendorVersions : int[]

Type

int[]

$encryptionStrengths

$encryptionStrengths : array<int,int>

Type

array

$MAP_KEY_STRENGTH_METHODS

$MAP_KEY_STRENGTH_METHODS : array<int,int>

Type

array

$vendorVersion

$vendorVersion : int

Type

int — Integer version number specific to the zip vendor

$keyStrength

$keyStrength : int

Type

int — Integer mode value indicating AES encryption strength

$compressionMethod

$compressionMethod : int

Type

int — The actual compression method used to compress the file

Methods

__construct()

__construct(int  $vendorVersion, int  $keyStrength, int  $compressionMethod) : mixed

Parameters

int $vendorVersion

Integer version number specific to the zip vendor

int $keyStrength

Integer mode value indicating AES encryption strength

int $compressionMethod

The actual compression method used to compress the file

Throws

\PhpZip\Exception\ZipUnsupportMethodException

Returns

mixed —

create()

create(\PhpZip\Model\ZipEntry  $entry) : \PhpZip\Model\Extra\Fields\WinZipAesExtraField

Parameters

\PhpZip\Model\ZipEntry $entry

Throws

\PhpZip\Exception\ZipUnsupportMethodException

Returns

\PhpZip\Model\Extra\Fields\WinZipAesExtraField —

getHeaderId()

getHeaderId() : int

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.

Returns

int —

unpackLocalFileData()

unpackLocalFileData(string  $buffer, \PhpZip\Model\ZipEntry|null  $entry = null) : \PhpZip\Model\Extra\Fields\WinZipAesExtraField

Populate data from this array as if it was in local file data.

Parameters

string $buffer

the buffer to read data from

\PhpZip\Model\ZipEntry|null $entry

Throws

\PhpZip\Exception\ZipException

on error

Returns

\PhpZip\Model\Extra\Fields\WinZipAesExtraField —

unpackCentralDirData()

unpackCentralDirData(string  $buffer, \PhpZip\Model\ZipEntry|null  $entry = null) : \PhpZip\Model\Extra\Fields\WinZipAesExtraField

Populate data from this array as if it was in central directory data.

Parameters

string $buffer

the buffer to read data from

\PhpZip\Model\ZipEntry|null $entry

Throws

\PhpZip\Exception\ZipException

Returns

\PhpZip\Model\Extra\Fields\WinZipAesExtraField —

packLocalFileData()

packLocalFileData() : string

The actual data to put into local file data - without Header-ID or length specifier.

Returns

string —

the data

packCentralDirData()

packCentralDirData() : string

The actual data to put into central directory - without Header-ID or length specifier.

Returns

string —

the data

getVendorVersion()

getVendorVersion() : int

Returns the vendor version.

Returns

int —

setVendorVersion()

setVendorVersion(int  $vendorVersion) : mixed

Sets the vendor version.

Parameters

int $vendorVersion

the vendor version

Returns

mixed —

getVendorId()

getVendorId() : int

Returns vendor id.

Returns

int —

getKeyStrength()

getKeyStrength() : int

Returns

int —

setKeyStrength()

setKeyStrength(int  $keyStrength) : mixed

Set key strength.

Parameters

int $keyStrength

Returns

mixed —

getCompressionMethod()

getCompressionMethod() : int

Returns

int —

setCompressionMethod()

setCompressionMethod(int  $compressionMethod) : mixed

Parameters

int $compressionMethod

Throws

\PhpZip\Exception\ZipUnsupportMethodException

Returns

mixed —

getEncryptionStrength()

getEncryptionStrength() : int

Returns

int —

getEncryptionMethod()

getEncryptionMethod() : int

Returns

int —

isV1()

isV1() : bool

Returns

bool —

isV2()

isV2() : bool

Returns

bool —

getSaltSize()

getSaltSize() : int

Returns

int —

__toString()

__toString() : string

Returns

string —