Skip to content

Commit 3387e06

Browse files
author
Git for Windows Build Agent
committed
Update 11 packages
mingw-w64-clang-aarch64-git (2.56.0.4-1 -> 2.56.0.4-2) mingw-w64-clang-aarch64-git-credential-wincred (2.56.0.4-1 -> 2.56.0.4-2) mingw-w64-clang-aarch64-git-doc-html (2.56.0.4-1 -> 2.56.0.4-2) mingw-w64-clang-aarch64-git-for-windows-addons (2.56.0.4-1 -> 2.56.0.4-2) mingw-w64-clang-aarch64-git-gui (2.56.0.4-1 -> 2.56.0.4-2) mingw-w64-clang-aarch64-git-perl (2.56.0.4-1 -> 2.56.0.4-2) mingw-w64-clang-aarch64-git-send-email (2.56.0.4-1 -> 2.56.0.4-2) mingw-w64-clang-aarch64-git-subtree (2.56.0.4-1 -> 2.56.0.4-2) mingw-w64-clang-aarch64-git-svn (2.56.0.4-1 -> 2.56.0.4-2) mingw-w64-clang-aarch64-gitk (2.56.0.4-1 -> 2.56.0.4-2) mingw-w64-clang-aarch64-zlib (1.3.2-3 -> 1.4-1) Signed-off-by: Git for Windows Build Agent <[email protected]>
1 parent 386a900 commit 3387e06

588 files changed

Lines changed: 19797 additions & 15885 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
-7.7 KB
Binary file not shown.

‎clangarm64/bin/git-shell.exe‎

123 KB
Binary file not shown.
-7.7 KB
Binary file not shown.

‎clangarm64/bin/git-upload-pack.exe‎

-7.7 KB
Binary file not shown.

‎clangarm64/bin/git.exe‎

135 KB
Binary file not shown.

‎clangarm64/bin/libz-1.dll‎

114 KB
Binary file not shown.

‎clangarm64/bin/libzlibwapi.dll‎

150 KB
Binary file not shown.

‎clangarm64/bin/scalar.exe‎

123 KB
Binary file not shown.

‎clangarm64/bin/zlib1.dll‎

40 KB
Binary file not shown.

‎clangarm64/include/crypt.h‎

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
/* crypt.h -- base code for crypt/uncrypt ZIPfile
2+
3+
Copyright (C) 1998-2026 Gilles Vollant
4+
5+
This code is a modified version of crypting code in Infozip distribution
6+
7+
The encryption/decryption parts of this source code (as opposed to the
8+
non-echoing password parts) were originally written in Europe. The
9+
whole source package can be freely distributed, including from the USA.
10+
(Prior to January 2000, re-export from the US was a violation of US law.)
11+
12+
This encryption code is a direct transcription of the algorithm from
13+
Roger Schlafly, described by Phil Katz in the file appnote.txt. This
14+
file (appnote.txt) is distributed with the PKZIP program (even in the
15+
version without encryption capabilities).
16+
17+
If you don't need crypting in your application, just define symbols
18+
NOCRYPT and NOUNCRYPT.
19+
20+
This code support the "Traditional PKWARE Encryption".
21+
22+
The new AES encryption added on Zip format by Winzip (see the page
23+
https://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
24+
Encryption is not supported.
25+
*/
26+
27+
#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
28+
29+
/***********************************************************************
30+
* Return the next byte in the pseudo-random sequence
31+
*/
32+
static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) {
33+
unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
34+
* unpredictable manner on 16-bit systems; not a problem
35+
* with any known compiler so far, though */
36+
37+
(void)pcrc_32_tab;
38+
temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
39+
return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
40+
}
41+
42+
/***********************************************************************
43+
* Update the encryption keys with the next byte of plain text
44+
*/
45+
static int update_keys(unsigned long* pkeys, const z_crc_t* pcrc_32_tab, int c) {
46+
(*(pkeys+0)) = CRC32((*(pkeys+0)), c);
47+
(*(pkeys+1)) += (*(pkeys+0)) & 0xff;
48+
(*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
49+
{
50+
int keyshift = (int)((*(pkeys+1)) >> 24);
51+
(*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
52+
}
53+
return c;
54+
}
55+
56+
57+
/***********************************************************************
58+
* Initialize the encryption keys and the random header according to
59+
* the given password.
60+
*/
61+
static void init_keys(const char* passwd, unsigned long* pkeys, const z_crc_t* pcrc_32_tab) {
62+
*(pkeys+0) = 305419896L;
63+
*(pkeys+1) = 591751049L;
64+
*(pkeys+2) = 878082192L;
65+
while (*passwd != '\0') {
66+
update_keys(pkeys,pcrc_32_tab,(int)*passwd);
67+
passwd++;
68+
}
69+
}
70+
71+
#define zdecode(pkeys,pcrc_32_tab,c) \
72+
(update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
73+
74+
#define zencode(pkeys,pcrc_32_tab,c,t) \
75+
(t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), (Byte)t^(c))
76+
77+
#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
78+
79+
#define RAND_HEAD_LEN 12
80+
81+
/* The random header bytes come from the PCG32 generator in skipset.h, which
82+
must be included before this file when INCLUDECRYPTINGCODE_IFCRYPTALLOWED is
83+
defined. */
84+
static unsigned crypthead(const char* passwd, /* password string */
85+
unsigned char* buf, /* where to write header */
86+
int bufSize,
87+
unsigned long* pkeys,
88+
const z_crc_t* pcrc_32_tab,
89+
unsigned long crcForCrypting) {
90+
unsigned n; /* index in random header */
91+
int t; /* temporary */
92+
int c; /* random byte */
93+
unsigned char header[RAND_HEAD_LEN-2]; /* random header */
94+
static int seeded = 0; /* true once gen has been seeded */
95+
static set_rand_t gen; /* random header generator, persists so that
96+
each header is different */
97+
98+
if (bufSize<RAND_HEAD_LEN)
99+
return 0;
100+
101+
/* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the random
102+
* bytes to get less predictability.
103+
*/
104+
if (!seeded)
105+
{
106+
set_uniq(&gen, &gen);
107+
seeded = 1;
108+
}
109+
init_keys(passwd, pkeys, pcrc_32_tab);
110+
for (n = 0; n < RAND_HEAD_LEN-2; n++)
111+
{
112+
c = (int)(set_rand(&gen) >> 24);
113+
header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
114+
}
115+
/* Encrypt random header (last two bytes is high word of crc) */
116+
init_keys(passwd, pkeys, pcrc_32_tab);
117+
for (n = 0; n < RAND_HEAD_LEN-2; n++)
118+
{
119+
buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
120+
}
121+
buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
122+
buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
123+
return n;
124+
}
125+
126+
#endif

0 commit comments

Comments
 (0)