Cryptography

Methods performing data encryption and decryption and attributes used by them. More...

Functions

void CZipArchive::CryptDecodeBuffer (DWORD uCount)
 Decode uCount bytes from the internal buffer.
void CZipArchive::CryptEncodeBuffer ()
 Encode the internal buffer.
void CZipArchive::CryptEncode (char &c)
 Encode the character c and update encryption keys .
void CZipArchive::CryptCryptHeader (long iCrc, CZipAutoBuffer &buf)
 Create an encryption header for the new file in the archive.
DWORD CZipArchive::CryptCRC32 (DWORD l, char c)
void CZipArchive::CryptDecode (char &c)
 Decode the character c and update encryption keys .
char CZipArchive::CryptDecryptByte ()
bool CZipArchive::CryptCheck ()
 Decrypt the encryption header and check its control value.
void CZipArchive::CryptUpdateKeys (char c)
 Update encryption keys with the given value.
void CZipArchive::CryptInitKeys ()
 Initialize encryption keys .

Variables

CZipAutoBuffer CZipArchive::m_pszPassword
 The archive password.
DWORD CZipArchive::m_keys [3]
 Encryption keys.

Detailed Description

Methods performing data encryption and decryption and attributes used by them.


Function Documentation

bool CZipArchive::CryptCheck  )  [protected, inherited]
 

Decrypt the encryption header and check its control value.

The control value depends on the presence of the data descriptor.

Returns:
true if the control value is correct
See also:
CryptCryptHeader

void CZipArchive::CryptCryptHeader long  iCrc,
CZipAutoBuffer buf
[protected, inherited]
 

Create an encryption header for the new file in the archive.

Parameters:
iCrc A control value. Use the two lower bytes of CZipFileHeader::m_uModTime. This entails the need for a data description presence at the end of the compressed data. We cannot use the real CRC now, because we don't know it yet.
buf a buffer to receive the header
See also:
CryptCheck

void CZipArchive::CryptDecodeBuffer DWORD  uCount  )  [protected, inherited]
 

Decode uCount bytes from the internal buffer.

See also:
m_info

CZipInternalInfo::m_pBuffer

void CZipArchive::CryptEncodeBuffer  )  [protected, inherited]
 

Encode the internal buffer.

See also:
m_info

CZipInternalInfo::m_pBuffer


Variable Documentation

DWORD CZipArchive::m_keys[3] [protected, inherited]
 

Encryption keys.

The key values are initialized using a supplied encryption password.

See also:
CryptInitKeys

Definition at line 2239 of file ZipArchive.h.

CZipAutoBuffer CZipArchive::m_pszPassword [protected, inherited]
 

The archive password.

If empty, the new file will not be encrypted.

Definition at line 2232 of file ZipArchive.h.


ZipArchive Copyright © 2000 - 2006 Tadeusz Dracz . Generated at Fri Apr 7 13:55:25 2006.