MCPcopy Create free account
hub / github.com/Segs/Segs / DesCode

Method DesCode

Projects/CoX/Common/AuthProtocol/AuthPacketCodec.cpp:385–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385void AuthPacketCodec::DesCode(unsigned char *in_block,size_t size) const
386{
387 size_t blocks=size>>3;
388 unsigned long work[2];
389 unsigned char *cp;
390 cp = in_block;
391 for(size_t i=0;i<blocks;i++)
392 {
393 scrunch(cp,work);
394 desfunc(work,m_tDesContext.ek);
395 unscrun(work,cp);
396 cp+=8;
397 }
398
399}
400void AuthPacketCodec::SetXorKey(int key)
401{
402 xor_enc_key = xor_dec_key = 0;

Callers 1

encode_bufferFunction · 0.80

Calls 3

scrunchFunction · 0.85
desfuncFunction · 0.85
unscrunFunction · 0.85

Tested by

no test coverage detected