mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-14 02:11:40 -06:00
29 lines
480 B
C++
Executable File
29 lines
480 B
C++
Executable File
// Crypto/ZipCrypto.h
|
|
|
|
#pragma once
|
|
|
|
#ifndef __CRYPTO_ZIP_CRYPTO_H
|
|
#define __CRYPTO_ZIP_CRYPTO_H
|
|
|
|
namespace NCrypto {
|
|
namespace NZip {
|
|
|
|
const int kHeaderSize = 12;
|
|
class CCipher
|
|
{
|
|
UINT32 Keys[3];
|
|
void UpdateKeys(BYTE b);
|
|
BYTE DecryptByteSpec();
|
|
public:
|
|
void SetPassword(const BYTE *password, UINT32 passwordLength);
|
|
BYTE DecryptByte(BYTE encryptedByte);
|
|
BYTE EncryptByte(BYTE b);
|
|
void DecryptHeader(BYTE *buffer);
|
|
void EncryptHeader(BYTE *buffer);
|
|
|
|
};
|
|
|
|
}}
|
|
|
|
#endif
|