MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / FPERM

Function FPERM

src/cryptlib/des.cpp:291–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291inline void FPERM(word32 &left, word32 &right)
292{
293 word32 work;
294
295 right = rotr(right, 1U);
296 work = (left ^ right) & 0xaaaaaaaa;
297 right ^= work;
298 left = rotr(left^work, 9U);
299 work = (left ^ right) & 0x00ff00ff;
300 right ^= work;
301 left = rotl(left^work, 6U);
302 work = (left ^ right) & 0x33333333;
303 right ^= work;
304 left = rotl(left^work, 18U);
305 work = (left ^ right) & 0xffff0000;
306 right ^= work;
307 left = rotl(left^work, 20U);
308 work = (left ^ right) & 0xf0f0f0f0;
309 right ^= work;
310 left = rotr(left^work, 4U);
311}
312
313// Encrypt or decrypt a block of data in ECB mode
314void DES::ProcessBlock(const byte *inBlock, byte * outBlock)

Callers 1

ProcessBlockMethod · 0.85

Calls 2

rotrFunction · 0.85
rotlFunction · 0.85

Tested by

no test coverage detected