MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / SetKey15

Method SetKey15

Libraries/unrar/crypt1.cpp:17–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16
17void CryptData::SetKey15(const char *Password)
18{
19 InitCRC32(CRCTab);
20 uint PswCRC=CRC32(0xffffffff,Password,strlen(Password));
21 Key15[0]=PswCRC&0xffff;
22 Key15[1]=(PswCRC>>16)&0xffff;
23 Key15[2]=Key15[3]=0;
24 for (size_t I=0;Password[I]!=0;I++)
25 {
26 byte P=Password[I];
27 Key15[2]^=P^CRCTab[P];
28 Key15[3]+=P+(CRCTab[P]>>16);
29 }
30}
31
32
33void CryptData::SetAV15Encryption()

Callers

nothing calls this directly

Calls 2

InitCRC32Function · 0.85
CRC32Function · 0.85

Tested by

no test coverage detected