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

Function init_keys

common/minizip/crypt.h:65–74  ·  view source on GitHub ↗

* Initialize the encryption keys and the random header according to * the given password. */

Source from the content-addressed store, hash-verified

63 * the given password.
64 */
65static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab)
66{
67 *(pkeys+0) = 305419896L;
68 *(pkeys+1) = 591751049L;
69 *(pkeys+2) = 878082192L;
70 while (*passwd != '\0') {
71 update_keys(pkeys,pcrc_32_tab,(int)*passwd);
72 passwd++;
73 }
74}
75
76#define zdecode(pkeys,pcrc_32_tab,c) \
77 (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))

Callers 2

unzOpenCurrentFile3Function · 0.85
cryptheadFunction · 0.85

Calls 1

update_keysFunction · 0.85

Tested by

no test coverage detected