annotate src/crypt_zip.c @ 15521:6d949e552e99 v8.1.0768

patch 8.1.0768: updating completions may cause the popup menu to flicker commit https://github.com/vim/vim/commit/ae654385dfb2ae4c1d70789d1dce3676dba4dfbc Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 17 21:09:05 2019 +0100 patch 8.1.0768: updating completions may cause the popup menu to flicker Problem: Updating completions may cause the popup menu to flicker. Solution: Avoid updating the text below the popup menu before drawing the popup menu.
author Bram Moolenaar <Bram@vim.org>
date Thu, 17 Jan 2019 21:15:06 +0100
parents 27b9a84395b5
children 2dcaa860e3fc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10042
4aead6a9b7a9 commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents: 7817
diff changeset
1 /* vi:set ts=8 sts=4 sw=4 noet:
6122
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 *
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 *
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 * Do ":help uganda" in Vim to read copying and usage conditions.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 * Do ":help credits" in Vim to see a list of people who contributed.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 * See README.txt for an overview of the Vim source code.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 /*
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 * crypt_zip.c: Zip encryption support.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 #include "vim.h"
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 #if defined(FEAT_CRYPT) || defined(PROTO)
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 /*
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 * Optional encryption support.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 * Mohsin Ahmed, mosh@sasi.com, 98-09-24
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 * Based on zip/crypt sources.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 *
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 * NOTE FOR USA: Since 2000 exporting this code from the USA is allowed to
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 * most countries. There are a few exceptions, but that still should not be a
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 * problem since this code was originally created in Europe and India.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 /* Need a type that should be 32 bits. 64 also works but wastes space. */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 # if VIM_SIZEOF_INT >= 4
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 typedef unsigned int u32_T; /* int is at least 32 bits */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 # else
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 typedef unsigned long u32_T; /* long should be 32 bits or more */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 # endif
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 /* The state of encryption, referenced by cryptstate_T. */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 typedef struct {
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 u32_T keys[3];
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 } zip_state_T;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 static u32_T crc_32_table[256];
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 /*
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 * Fill the CRC table, if not done already.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 static void
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
45 make_crc_tab(void)
6122
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 {
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 u32_T s, t, v;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 static int done = FALSE;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 if (done)
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 return;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 for (t = 0; t < 256; t++)
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 {
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 v = t;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 for (s = 0; s < 8; s++)
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 v = (v >> 1) ^ ((v & 1) * (u32_T)0xedb88320L);
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 crc_32_table[t] = v;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 }
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 done = TRUE;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 }
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 #define CRC32(c, b) (crc_32_table[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8))
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 /*
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 * Return the next byte in the pseudo-random sequence.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 #define DECRYPT_BYTE_ZIP(keys, t) { \
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 short_u temp = (short_u)keys[2] | 2; \
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 t = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff); \
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 }
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 /*
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 * Update the encryption keys with the next byte of plain text.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 #define UPDATE_KEYS_ZIP(keys, c) { \
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 keys[0] = CRC32(keys[0], (c)); \
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 keys[1] += keys[0] & 0xff; \
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 keys[1] = keys[1] * 134775813L + 1; \
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 keys[2] = CRC32(keys[2], (int)(keys[1] >> 24)); \
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 }
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 /*
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 * Initialize for encryption/decryption.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 void
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
86 crypt_zip_init(
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
87 cryptstate_T *state,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
88 char_u *key,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
89 char_u *salt UNUSED,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
90 int salt_len UNUSED,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
91 char_u *seed UNUSED,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
92 int seed_len UNUSED)
6122
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 {
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 char_u *p;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 zip_state_T *zs;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 zs = (zip_state_T *)alloc(sizeof(zip_state_T));
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 state->method_state = zs;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100 make_crc_tab();
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
101 zs->keys[0] = 305419896L;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 zs->keys[1] = 591751049L;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103 zs->keys[2] = 878082192L;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 for (p = key; *p != NUL; ++p)
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 {
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106 UPDATE_KEYS_ZIP(zs->keys, (int)*p);
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107 }
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108 }
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110 /*
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
111 * Encrypt "from[len]" into "to[len]".
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
112 * "from" and "to" can be equal to encrypt in place.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
113 */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
114 void
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
115 crypt_zip_encode(
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
116 cryptstate_T *state,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
117 char_u *from,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
118 size_t len,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
119 char_u *to)
6122
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
120 {
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
121 zip_state_T *zs = state->method_state;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
122 size_t i;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
123 int ztemp, t;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
124
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
125 for (i = 0; i < len; ++i)
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
126 {
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
127 ztemp = from[i];
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
128 DECRYPT_BYTE_ZIP(zs->keys, t);
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
129 UPDATE_KEYS_ZIP(zs->keys, ztemp);
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
130 to[i] = t ^ ztemp;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
131 }
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
132 }
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
133
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
134 /*
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
135 * Decrypt "from[len]" into "to[len]".
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
136 */
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
137 void
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
138 crypt_zip_decode(
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
139 cryptstate_T *state,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
140 char_u *from,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
141 size_t len,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
142 char_u *to)
6122
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
143 {
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
144 zip_state_T *zs = state->method_state;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
145 size_t i;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
146 short_u temp;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
147
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
148 for (i = 0; i < len; ++i)
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
149 {
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
150 temp = (short_u)zs->keys[2] | 2;
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
151 temp = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff);
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
152 UPDATE_KEYS_ZIP(zs->keys, to[i] = from[i] ^ temp);
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
153 }
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
154 }
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
155
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
156 #endif /* FEAT_CRYPT */