\PhpZip\IO\Filter\Cipher\PkwarePKCryptContext

Traditional PKWARE Encryption Engine.

Summary

Methods
Properties
Constants
__construct()
checkHeader()
decryptString()
encryptString()
No public properties found
STD_DEC_HDR_SIZE
No protected methods found
No protected properties found
N/A
decryptByte()
updateKeys()
crc32()
encryptByte()
$CRC_TABLE
$keys
N/A

Constants

STD_DEC_HDR_SIZE

STD_DEC_HDR_SIZE = 12

Encryption header size

Properties

$CRC_TABLE

$CRC_TABLE : int[]|array

Crc table.

Type

int[]|array

$keys

$keys : array

Encryption keys.

Type

array

Methods

__construct()

__construct(string  $password) : mixed

PKCryptContext constructor.

Parameters

string $password

Returns

mixed —

checkHeader()

checkHeader(string  $header, int  $checkByte) : mixed

Parameters

string $header
int $checkByte

Throws

\PhpZip\Exception\ZipAuthenticationException

Returns

mixed —

decryptString()

decryptString(string  $content) : string

Parameters

string $content

Returns

string —

encryptString()

encryptString(string  $content) : string

Parameters

string $content

Returns

string —

decryptByte()

decryptByte() : int

Decrypt byte.

Returns

int —

updateKeys()

updateKeys(int  $charAt) : mixed

Update keys.

Parameters

int $charAt

Returns

mixed —

crc32()

crc32(int  $oldCrc, int  $charAt) : int

Update crc.

Parameters

int $oldCrc
int $charAt

Returns

int —

encryptByte()

encryptByte(int  $byte) : int

Parameters

int $byte

Returns

int —