Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cZipCrypt Class Reference

#include <cZipDir.h>

Inheritance diagram for GrayLib::cZipCrypt:
ICipherBase

Public Member Functions

 cZipCrypt ()
 
 ~cZipCrypt ()
 
bool InitDecrypt (const char *pszPass, BYTE *pBuffer)
 
void InitEncrypt (const char *pszPass, BYTE *pBuffer, UINT32 dwCRCForCrypting)
 
BYTE EncryptByte (BYTE c)
 
BYTE DecryptByte (BYTE c)
 
virtual size_t get_BlockAlignSize () const override
 
virtual HRESULT Cipher (BYTE *pOutput, const BYTE *pInput, size_t nSizeBytes) override
 

Static Public Attributes

static const size_t k_LEN_HEAD = 12
 in bytes More...
 

Detailed Description

Encrypt/Decrypt a file entry in the zip. ASSUME ZFLG_CRYPT and adds k_LEN_HEAD to the entry. Each file/entry in the ZIP can have a separate crypt and password.

Constructor & Destructor Documentation

◆ cZipCrypt()

GrayLib::cZipCrypt::cZipCrypt ( )

◆ ~cZipCrypt()

GrayLib::cZipCrypt::~cZipCrypt ( )

Member Function Documentation

◆ Cipher()

virtual HRESULT GrayLib::cZipCrypt::Cipher ( BYTE *  pOutput,
const BYTE *  pInput,
size_t  nSizeBytes 
)
inlineoverridevirtual

ICipherBase

Returns
Length encrypted/decrypted.

◆ DecryptByte()

BYTE GrayLib::cZipCrypt::DecryptByte ( BYTE  c)
inline

◆ EncryptByte()

BYTE GrayLib::cZipCrypt::EncryptByte ( BYTE  c)
inline

◆ get_BlockAlignSize()

virtual size_t GrayLib::cZipCrypt::get_BlockAlignSize ( ) const
inlineoverridevirtual
Returns
Data block alignment for this type of Cipher. default = no min block size (1 byte).

◆ InitDecrypt()

bool GrayLib::cZipCrypt::InitDecrypt ( const char *  pszPass,
BYTE *  pBuffer 
)

◆ InitEncrypt()

void GrayLib::cZipCrypt::InitEncrypt ( const char *  pszPass,
BYTE *  pBuffer,
UINT32  dwCRCForCrypting 
)

Member Data Documentation

◆ k_LEN_HEAD

const size_t GrayLib::cZipCrypt::k_LEN_HEAD = 12
static

in bytes


The documentation for this class was generated from the following file: