diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2016-05-23 03:00:00 +0300 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:17:00 +0300 |
commit | 1eddf527cacc149016ec987d554d3dfb52b69131 (patch) | |
tree | 1e9577086dd9b3461bc3f6727f7449b7fe45eced /C | |
parent | bec3b479dcae1345a466ebe923989b0bd56fd5b6 (diff) |
16.0216.02
Diffstat (limited to 'C')
-rw-r--r-- | C/7zVersion.h | 8 | ||||
-rw-r--r-- | C/Aes.c | 10 | ||||
-rw-r--r-- | C/Ppmd7.c | 8 | ||||
-rw-r--r-- | C/Ppmd7.h | 6 | ||||
-rw-r--r-- | C/Ppmd8.c | 6 | ||||
-rw-r--r-- | C/Sha1.c | 7 | ||||
-rw-r--r-- | C/Sha1.h | 4 |
7 files changed, 25 insertions, 24 deletions
diff --git a/C/7zVersion.h b/C/7zVersion.h index 9faf5a4e..e884fc67 100644 --- a/C/7zVersion.h +++ b/C/7zVersion.h @@ -1,9 +1,9 @@ #define MY_VER_MAJOR 16 -#define MY_VER_MINOR 01 +#define MY_VER_MINOR 02 #define MY_VER_BUILD 0 -#define MY_VERSION_NUMBERS "16.01" -#define MY_VERSION "16.01" -#define MY_DATE "2016-05-19" +#define MY_VERSION_NUMBERS "16.02" +#define MY_VERSION "16.02" +#define MY_DATE "2016-05-21" #undef MY_COPYRIGHT #undef MY_VERSION_COPYRIGHT_DATE #define MY_AUTHOR_NAME "Igor Pavlov" @@ -1,5 +1,5 @@ /* Aes.c -- AES encryption / decryption -2015-02-23 : Igor Pavlov : Public domain */ +2016-05-21 : Igor Pavlov : Public domain */ #include "Precomp.h" @@ -167,10 +167,10 @@ void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *w, const Byte *key, unsigned keySize) { UInt32 r = w[i]; w[i] = - D[ Sbox[gb0(r)]] ^ - D[0x100 + Sbox[gb1(r)]] ^ - D[0x200 + Sbox[gb2(r)]] ^ - D[0x300 + Sbox[gb3(r)]]; + D[ (unsigned)Sbox[gb0(r)]] ^ + D[0x100 + (unsigned)Sbox[gb1(r)]] ^ + D[0x200 + (unsigned)Sbox[gb2(r)]] ^ + D[0x300 + (unsigned)Sbox[gb3(r)]]; } } @@ -1,5 +1,5 @@ /* Ppmd7.c -- PPMdH codec -2015-09-28 : Igor Pavlov : Public domain +2016-05-21 : Igor Pavlov : Public domain This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ #include "Precomp.h" @@ -639,10 +639,10 @@ CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *escFreq) unsigned nonMasked = p->MinContext->NumStats - numMasked; if (p->MinContext->NumStats != 256) { - see = p->See[p->NS2Indx[nonMasked - 1]] + + see = p->See[(unsigned)p->NS2Indx[nonMasked - 1]] + (nonMasked < (unsigned)SUFFIX(p->MinContext)->NumStats - p->MinContext->NumStats) + - 2 * (p->MinContext->SummFreq < 11 * p->MinContext->NumStats) + - 4 * (numMasked > nonMasked) + + 2 * (unsigned)(p->MinContext->SummFreq < 11 * p->MinContext->NumStats) + + 4 * (unsigned)(numMasked > nonMasked) + p->HiBitsFlag; { unsigned r = (see->Summ >> see->Shift); @@ -1,5 +1,5 @@ /* Ppmd7.h -- PPMdH compression codec -2010-03-12 : Igor Pavlov : Public domain +2016-05-21 : Igor Pavlov : Public domain This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ /* This code supports virtual RangeDecoder and includes the implementation @@ -86,10 +86,10 @@ void Ppmd7_Update2(CPpmd7 *p); void Ppmd7_UpdateBin(CPpmd7 *p); #define Ppmd7_GetBinSumm(p) \ - &p->BinSumm[Ppmd7Context_OneState(p->MinContext)->Freq - 1][p->PrevSuccess + \ + &p->BinSumm[(unsigned)Ppmd7Context_OneState(p->MinContext)->Freq - 1][p->PrevSuccess + \ p->NS2BSIndx[Ppmd7_GetContext(p, p->MinContext->Suffix)->NumStats - 1] + \ (p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]) + \ - 2 * p->HB2Flag[Ppmd7Context_OneState(p->MinContext)->Symbol] + \ + 2 * p->HB2Flag[(unsigned)Ppmd7Context_OneState(p->MinContext)->Symbol] + \ ((p->RunLength >> 26) & 0x20)] CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *scale); @@ -1,5 +1,5 @@ /* Ppmd8.c -- PPMdI codec -2016-05-16 : Igor Pavlov : Public domain +2016-05-21 : Igor Pavlov : Public domain This code is based on PPMd var.I (2002): Dmitry Shkarin : Public domain */ #include "Precomp.h" @@ -1038,9 +1038,9 @@ CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked1, UInt32 *escFreq) CPpmd_See *see; if (p->MinContext->NumStats != 0xFF) { - see = p->See[p->NS2Indx[p->MinContext->NumStats + 2] - 3] + + see = p->See[(unsigned)p->NS2Indx[(unsigned)p->MinContext->NumStats + 2] - 3] + (p->MinContext->SummFreq > 11 * ((unsigned)p->MinContext->NumStats + 1)) + - 2 * (2 * (unsigned)p->MinContext->NumStats < + 2 * (unsigned)(2 * (unsigned)p->MinContext->NumStats < ((unsigned)SUFFIX(p->MinContext)->NumStats + numMasked1)) + p->MinContext->Flags; { @@ -1,5 +1,5 @@ /* Sha1.c -- SHA-1 Hash -2016-02-09 : Igor Pavlov : Public domain +2016-05-20 : Igor Pavlov : Public domain This code is based on public domain code of Steve Reid from Wei Dai's Crypto++ library. */ #include "Precomp.h" @@ -212,7 +212,7 @@ void Sha1_Update(CSha1 *p, const Byte *data, size_t size) } } -void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size, int rar350Mode) +void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size /* , int rar350Mode */) { int returnRes = False; @@ -246,7 +246,8 @@ void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size, int rar350Mode) SetUi32(prev, d); } } - returnRes = rar350Mode; + // returnRes = rar350Mode; + returnRes = True; } } } @@ -1,5 +1,5 @@ /* Sha1.h -- SHA-1 Hash -2015-03-04 : Igor Pavlov : Public domain */ +2016-05-20 : Igor Pavlov : Public domain */ #ifndef __7Z_SHA1_H #define __7Z_SHA1_H @@ -27,7 +27,7 @@ void Sha1_GetBlockDigest(CSha1 *p, const UInt32 *data, UInt32 *destDigest); void Sha1_Update(CSha1 *p, const Byte *data, size_t size); void Sha1_Final(CSha1 *p, Byte *digest); -void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size, int rar350Mode); +void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size /* , int rar350Mode */); void Sha1_32_PrepareBlock(const CSha1 *p, UInt32 *block, unsigned size); void Sha1_32_Update(CSha1 *p, const UInt32 *data, size_t size); |