Skip Navigation Links
Skip Navigation LinksHome > ZipArchive > How to Use > API Documentation
The ZipArchive Library

#include <ZipCrc32Cryptograph.h>

Inheritance diagram for CZipCrc32Cryptograph:
Inheritance graph

Public Member Functions

bool CanHandle (int iEncryptionMethod)
void Decode (char *pBuffer, DWORD uSize)
void Encode (char *pBuffer, DWORD uSize)
bool InitDecode (CZipAutoBuffer &password, CZipFileHeader &currentFile, CZipStorage &storage, bool ignoreCheck)
void InitEncode (CZipAutoBuffer &password, CZipFileHeader &currentFile, CZipStorage &storage)
Public Member Functions inherited from CZipCryptograph
virtual bool CanHandle (int ZIP_UNUSED iEncryptionMethod)
virtual void FinishDecode (CZipFileHeader &ZIP_UNUSED currentFile, CZipStorage &ZIP_UNUSED storage)
virtual void FinishEncode (CZipFileHeader &ZIP_UNUSED currentFile, CZipStorage &ZIP_UNUSED storage)

Static Public Member Functions

static const z_crc_t * GetCRCTable ()
static DWORD GetEncryptedInfoSizeAfterData ()
static DWORD GetEncryptedInfoSizeBeforeData ()
Static Public Member Functions inherited from CZipCryptograph
static CZipCryptographCreateCryptograph (int iEncryptionMethod)
static DWORD GetEncryptedInfoSize (int iEncryptionMethod)
static DWORD GetEncryptedInfoSizeAfterData (int iEncryptionMethod)
static DWORD GetEncryptedInfoSizeBeforeData (int iEncryptionMethod)
static bool IsEncryptionSupported (int iEncryptionMethod)
static bool IsWinZipAesEncryption (int iEncryptionMethod)

Additional Inherited Members

Public Types inherited from CZipCryptograph
enum  EncryptionMethod {
  encStandard , encWinZipAes128 , encWinZipAes192 , encWinZipAes256 ,
  encNone = 0xFF
}

Detailed Description

Performs the traditional zip encryption.

See also
Encryption Methods: How to Best Protect Your Data

Member Function Documentation

◆ CanHandle()

bool CZipCrc32Cryptograph::CanHandle ( int iEncryptionMethod)
inline

Checks if this cryptograph can handle the specified encryption method.

Parameters
iEncryptionMethodThe encryption method to check.
Returns
true if standard CRC32 encryption; false otherwise.

◆ Decode()

void CZipCrc32Cryptograph::Decode ( char * pBuffer,
DWORD uSize )
inlinevirtual

Decodes the given data.

Parameters
pBufferThe buffer that holds the data to decode and that receives the results.
uSizeThe size of pBuffer.

Implements CZipCryptograph.

◆ Encode()

void CZipCrc32Cryptograph::Encode ( char * pBuffer,
DWORD uSize )
inlinevirtual

Encodes the given data.

Parameters
pBufferThe buffer that holds the data to encode and that receives the results.
uSizeThe size of pBuffer.

Implements CZipCryptograph.

◆ GetCRCTable()

const z_crc_t * CZipCrc32Cryptograph::GetCRCTable ( )
inlinestatic

Returns the CRC table.

◆ GetEncryptedInfoSizeAfterData()

DWORD CZipCrc32Cryptograph::GetEncryptedInfoSizeAfterData ( )
inlinestatic

◆ GetEncryptedInfoSizeBeforeData()

DWORD CZipCrc32Cryptograph::GetEncryptedInfoSizeBeforeData ( )
inlinestatic

◆ InitDecode()

bool CZipCrc32Cryptograph::InitDecode ( CZipAutoBuffer & password,
CZipFileHeader & currentFile,
CZipStorage & storage,
bool ignoreCheck )
virtual

The method called when an existing file is opened for extraction.

Parameters
passwordThe supplied password with the CZipArchive::SetPassword method.
currentFileThe file being decoded and extracted.
storageThe current CZipStorage.
ignoreCheckIf true, skips control bytes verifications.
Returns
true, if the password is initially considered correct; false otherwise.

Implements CZipCryptograph.

◆ InitEncode()

void CZipCrc32Cryptograph::InitEncode ( CZipAutoBuffer & password,
CZipFileHeader & currentFile,
CZipStorage & storage )
virtual

The method called when a new file is opened for compression.

Parameters
passwordThe supplied password with the CZipArchive::SetPassword method.
currentFileThe file being compressed and encoded.
storageThe current CZipStorage.

Implements CZipCryptograph.


The documentation for this class was generated from the following file:
Back To Top Up