Changes

Jump to: navigation, search

DPS915 C U D A B O Y S

21 bytes added, 15:33, 3 November 2015
Description
getRC4Buffer << < dGrid, dBlock >> >(d_a, bufferSize, d_output);
...
 
Converting <code>cycle</code> and <code>rc4_output</code> functions to device functions:
* Description: Device function cycle
**/
__device__ char cycle(char value) { int leftMask = 170; int rightMask = 85; int iLeft = value & leftMask; int iRight = value & rightMask; iLeft = iLeft >> 1; iRight = iRight << 1; return iLeft | iRight; }
/**
* Description: Device function RC4
**/
__device__ unsigned char rc4_output() { unsigned char temp; unsigned char S[0x100]; // dec 256 unsigned int i, j; i = (i + 1) & 0xFF; j = (j + S[i]) & 0xFF; temp = S[i]; S[i] = S[j]; S[j] = temp; return S[(S[i] + S[j]) & 0xFF]; }
==== Profiling ====

Navigation menu