This commit is contained in:
Igor Pavlov
2003-12-11 00:00:00 +00:00
committed by Kornel Lesiński
commit 8c1b5c7b7e
982 changed files with 118799 additions and 0 deletions

28
7zip/Crypto/Zip/ZipCrypto.h Executable file
View File

@@ -0,0 +1,28 @@
// 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