mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-13 06:11:32 -06:00
15.05
This commit is contained in:
committed by
Kornel Lesiński
parent
0713a3ab80
commit
54490d51d5
@@ -11,17 +11,20 @@
|
||||
namespace NCrypto {
|
||||
namespace NRar20 {
|
||||
|
||||
/* ICompressFilter::Init() does nothing for this filter.
|
||||
Call CryptoSetPassword() to initialize filter. */
|
||||
|
||||
class CData
|
||||
{
|
||||
Byte SubstTable[256];
|
||||
UInt32 Keys[4];
|
||||
|
||||
UInt32 SubstLong(UInt32 t)
|
||||
UInt32 SubstLong(UInt32 t) const
|
||||
{
|
||||
return (UInt32)SubstTable[(int)t & 255] |
|
||||
((UInt32)SubstTable[(int)(t >> 8) & 255] << 8) |
|
||||
((UInt32)SubstTable[(int)(t >> 16) & 255] << 16) |
|
||||
((UInt32)SubstTable[(int)(t >> 24) & 255] << 24);
|
||||
return (UInt32)SubstTable[(unsigned)t & 255]
|
||||
| ((UInt32)SubstTable[(unsigned)(t >> 8) & 255] << 8)
|
||||
| ((UInt32)SubstTable[(unsigned)(t >> 16) & 255] << 16)
|
||||
| ((UInt32)SubstTable[(unsigned)(t >> 24) & 255] << 24);
|
||||
}
|
||||
void UpdateKeys(const Byte *data);
|
||||
void CryptBlock(Byte *buf, bool encrypt);
|
||||
@@ -34,7 +37,8 @@ public:
|
||||
class CDecoder:
|
||||
public ICompressFilter,
|
||||
public ICryptoSetPassword,
|
||||
public CMyUnknownImp
|
||||
public CMyUnknownImp,
|
||||
public CData
|
||||
{
|
||||
CData _cipher;
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user