Click here to Skip to main content
15,921,694 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralActivex Programing Pin
Asghar Teimoori21-Jul-02 21:50
Asghar Teimoori21-Jul-02 21:50 
GeneralRe: Activex Programing Pin
super21-Jul-02 22:58
professionalsuper21-Jul-02 22:58 
Generalgdi+ with 3d line Pin
realfly21-Jul-02 21:20
realfly21-Jul-02 21:20 
GeneralRe: gdi+ with 3d line Pin
NormDroid21-Jul-02 21:46
professionalNormDroid21-Jul-02 21:46 
GeneralRe: gdi+ with 3d line Pin
realfly22-Jul-02 15:41
realfly22-Jul-02 15:41 
GeneralRe: gdi+ with 3d line Pin
Christian Graus22-Jul-02 1:15
protectorChristian Graus22-Jul-02 1:15 
QuestionHow can I change a border width for frame? Pin
yesong21-Jul-02 20:57
yesong21-Jul-02 20:57 
GeneralRC4 encryption class ... Pin
Anonymous21-Jul-02 20:33
Anonymous21-Jul-02 20:33 
Well, im trying to write this RC4 encryption class... but its not working properly.... And I cant find the bug.... Can you?


class CEncrypt
{
int m_sBox[256];

public:
CEncrypt() {}
~CEncrypt() {}

void SetKey(char *sKey, int iKeyLen)
{
int i, j = 0, k;

for (i = 0; i < 256; i++)
m_sBox[i] = i;

for (i = 0; i < 256; i++) {
j = (j + m_sBox[i] + sKey[i % iKeyLen]) % 256;
k = m_sBox[i];
m_sBox[i] = m_sBox[j];
m_sBox[j] = k;
}
}

void Encrypt(char *sBuffer, int iBufferLen)
{
int sBox[256], iOffset, i = 0, j = 0, k;

memcpy(sBox, m_sBox, sizeof(m_sBox));

for (iOffset = 0; iOffset < iBufferLen; iOffset++) {
i = (i + 1) % 256;
j = (j + sBox[i]) % 256;
k = sBox[i];
sBox[i] = sBox[j];
sBox[j] = k;

sBuffer[iOffset] = sBuffer[iOffset] ^ (sBox[(sBox[i] + sBox[j]) % 256]);
}
}
};
GeneralRe: RC4 encryption class ... Pin
benjymous22-Jul-02 0:34
benjymous22-Jul-02 0:34 
GeneralRe: RC4 encryption class ... Pin
Martin Ziacek22-Jul-02 1:49
Martin Ziacek22-Jul-02 1:49 
GeneralRC4 encryption class... Pin
Anonymous21-Jul-02 20:32
Anonymous21-Jul-02 20:32 
GeneralATL-OleDb consumer classes & Windows CE Pin
Member 40090921-Jul-02 20:23
Member 40090921-Jul-02 20:23 
QuestionHow do you get special folder path/names? Pin
Abin21-Jul-02 19:30
Abin21-Jul-02 19:30 
AnswerRe: How do you get special folder path/names? Pin
PJ Arends21-Jul-02 19:48
professionalPJ Arends21-Jul-02 19:48 
Generalgrouped command buttons Pin
dhon21-Jul-02 19:04
dhon21-Jul-02 19:04 
GeneralA question of device Pin
bigcake21-Jul-02 16:15
bigcake21-Jul-02 16:15 
Generala question about tree control Pin
realfly21-Jul-02 16:14
realfly21-Jul-02 16:14 
GeneralRe: a question about tree control Pin
Matt Newman21-Jul-02 16:25
Matt Newman21-Jul-02 16:25 
GeneralRe: a question about tree control Pin
realfly21-Jul-02 16:56
realfly21-Jul-02 16:56 
GeneralRe: a question about tree control Pin
Matt Newman22-Jul-02 7:39
Matt Newman22-Jul-02 7:39 
GeneralRe: a question about tree control Pin
realfly22-Jul-02 15:29
realfly22-Jul-02 15:29 
GeneralRe: a question about tree control Pin
Matt Newman22-Jul-02 15:32
Matt Newman22-Jul-02 15:32 
GeneralLooking for a good algorithm to compare lots of files Pin
Hiusing21-Jul-02 16:06
Hiusing21-Jul-02 16:06 
GeneralRe: Looking for a good algorithm to compare lots of files Pin
Chris Losinger21-Jul-02 17:29
professionalChris Losinger21-Jul-02 17:29 
GeneralRe: Looking for a good algorithm to compare lots of files Pin
Alexandru Savescu21-Jul-02 23:44
Alexandru Savescu21-Jul-02 23:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.