Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ZipCrypto.h « Zip « Crypto « 7zip « CPP - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6b4ecaaad10491b72a60e485ec40823605361862 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Crypto/ZipCrypto.h

#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