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

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Crypto/Zip/ZipCrypto.h')
-rwxr-xr-xCPP/7zip/Crypto/Zip/ZipCrypto.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/CPP/7zip/Crypto/Zip/ZipCrypto.h b/CPP/7zip/Crypto/Zip/ZipCrypto.h
new file mode 100755
index 00000000..6b4ecaaa
--- /dev/null
+++ b/CPP/7zip/Crypto/Zip/ZipCrypto.h
@@ -0,0 +1,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