MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / update_keys

Function update_keys

deps/unzipfx/crypt.c:163–176  ·  view source on GitHub ↗

* Update the encryption keys with the next byte of plain text */

Source from the content-addressed store, hash-verified

161 * Update the encryption keys with the next byte of plain text
162 */
163int update_keys(__G__ c)
164 __GDEF
165 int c; /* byte of plain text */
166{
167 GLOBAL(keys[0]) = CRC32(GLOBAL(keys[0]), c, CRY_CRC_TAB);
168 GLOBAL(keys[1]) = (GLOBAL(keys[1])
169 + (GLOBAL(keys[0]) & 0xff))
170 * 134775813L + 1;
171 {
172 register int keyshift = (int)(GLOBAL(keys[1]) >> 24);
173 GLOBAL(keys[2]) = CRC32(GLOBAL(keys[2]), keyshift, CRY_CRC_TAB);
174 }
175 return c;
176}
177
178
179/***********************************************************************

Callers 1

crypt.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected