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

Method Crypt15

Libraries/unrar/crypt1.cpp:65–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64
65void CryptData::Crypt15(byte *Data,size_t Count)
66{
67 while (Count--)
68 {
69 Key15[0]+=0x1234;
70 Key15[1]^=CRCTab[(Key15[0] & 0x1fe)>>1];
71 Key15[2]-=CRCTab[(Key15[0] & 0x1fe)>>1]>>16;
72 Key15[0]^=Key15[2];
73 Key15[3]=rotrs(Key15[3]&0xffff,1,16)^Key15[1];
74 Key15[3]=rotrs(Key15[3]&0xffff,1,16);
75 Key15[0]^=Key15[3];
76 *Data^=(byte)(Key15[0]>>8);
77 Data++;
78 }
79}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected