MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / update_keys

Function update_keys

common/minizip/crypt.h:48–58  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

46 * Update the encryption keys with the next byte of plain text
47 */
48static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)
49{
50 (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
51 (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
52 (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
53 {
54 register int keyshift = (int)((*(pkeys+1)) >> 24);
55 (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
56 }
57 return c;
58}
59
60
61/***********************************************************************

Callers 1

init_keysFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected