Click here to Skip to main content
15,915,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionselected list item of another dialog Pin
rp_suman1-Jul-07 18:52
rp_suman1-Jul-07 18:52 
AnswerRe: selected list item of another dialog Pin
Hamid_RT1-Jul-07 19:24
Hamid_RT1-Jul-07 19:24 
AnswerRe: selected list item of another dialog Pin
Johan Pretorius1-Jul-07 20:25
Johan Pretorius1-Jul-07 20:25 
AnswerRe: selected list item of another dialog Pin
David Crow2-Jul-07 4:35
David Crow2-Jul-07 4:35 
GeneralRe: selected list item of another dialog Pin
rp_suman4-Jul-07 22:33
rp_suman4-Jul-07 22:33 
GeneralRe: selected list item of another dialog Pin
David Crow5-Jul-07 3:17
David Crow5-Jul-07 3:17 
QuestionApplication Error The Exception BreakPoint Pin
shivditya1-Jul-07 18:47
shivditya1-Jul-07 18:47 
Questionpassing an array as a parameter Pin
NalBH1-Jul-07 18:37
NalBH1-Jul-07 18:37 
Dear all,

i have been requested to post my question on C here.Thanks


Here is my problem:
Am doing some analysis on RC4 TKIP.I want to create an RC4 key and XOR it with data.My RC4 key is Ok.But i want to pass it as a parameter so as to do encryption.

Can anyone among you help,as i have the RC4 keys in an array.But i want to pass this result in the second part of my program so as to do encryption with that key.

kind regards and thanks
NB
 rc4key[0] = tsc2 % 256; <br />
    rc4key[1] = (((tsc2 / 256) % 256) | 0x20) & 0x7f;<br />
    rc4key[2] = (tsc2 / 256) % 256; <br />
    rc4key[3] = ((ppk5 ^ ((256*key[1]) + key[0])) >> 1) % 256;<br />
<br />
    rc4key[4] = ppk0 % 256;<br />
    rc4key[5] = (ppk0 / 256) % 256;<br />
<br />
    rc4key[6] = ppk1 % 256;<br />
    rc4key[7] = (ppk1 / 256) % 256;<br />
<br />
    rc4key[8] = ppk2 % 256;<br />
    rc4key[9] = (ppk2 / 256) % 256;<br />
<br />
    rc4key[10] = ppk3 % 256;<br />
    rc4key[11] = (ppk3 / 256) % 256;<br />
<br />
    rc4key[12] = ppk4 % 256;<br />
    rc4key[13] = (ppk4 / 256) % 256;<br />
<br />
    rc4key[14] = ppk5 % 256;<br />
    rc4key[15] = (ppk5 / 256) % 256;<br />
//wanted to use the result of rc4 obtained above,isa it ok what i have been doing in the code that follows//<br />
void rc4(<br />
            unsigned char *rc4key,<br />
            <br />
            int cipherstream_length,<br />
            unsigned char *cipherstream<br />
        );<br />
void rc4_encrypt(<br />
            unsigned char *rc4key,<br />
           <br />
            unsigned char *data,<br />
            int data_length,<br />
            unsigned char *ciphertext<br />
        );<br />
<br />


these are the codes, I wanted to use the result in the array above and used it as a pointer!!!

am nt getting any syntax error..but isthere any logical error?

please advice.

nb
AnswerRe: passing an array as a parameter Pin
Mark Salsbery2-Jul-07 6:54
Mark Salsbery2-Jul-07 6:54 
QuestionHow to dock the views? Pin
ss4311-Jul-07 18:22
ss4311-Jul-07 18:22 
AnswerRe: How to dock the views? Pin
SandipG 1-Jul-07 19:56
SandipG 1-Jul-07 19:56 
GeneralRe: How to dock the views? Pin
swamy Narasimha1-Jul-07 23:27
swamy Narasimha1-Jul-07 23:27 
QuestionCImageList and a CListCtrl Pin
locoone1-Jul-07 18:01
locoone1-Jul-07 18:01 
AnswerRe: CImageList and a CListCtrl Pin
Naveen1-Jul-07 18:31
Naveen1-Jul-07 18:31 
GeneralRe: CImageList and a CListCtrl Pin
locoone2-Jul-07 9:08
locoone2-Jul-07 9:08 
GeneralRe: CImageList and a CListCtrl Pin
Naveen2-Jul-07 15:06
Naveen2-Jul-07 15:06 
AnswerRe: CImageList and a CListCtrl Pin
Hamid_RT1-Jul-07 21:12
Hamid_RT1-Jul-07 21:12 
AnswerRe: CImageList and a CListCtrl Pin
sps-itsec461-Jul-07 21:34
sps-itsec461-Jul-07 21:34 
QuestionMultiple thumbs on a slider control, Help?... Pin
smguc1-Jul-07 17:22
smguc1-Jul-07 17:22 
QuestionHow to read and write CPU cache? Pin
Surendra Vishwkarma1-Jul-07 16:10
Surendra Vishwkarma1-Jul-07 16:10 
AnswerRe: How to read and write CPU cache? Pin
hameduser1-Jul-07 21:22
hameduser1-Jul-07 21:22 
GeneralRe: How to read and write CPU cache? Pin
Surendra Vishwkarma5-Jul-07 16:07
Surendra Vishwkarma5-Jul-07 16:07 
QuestionHow to add outlookbar to multipe document? Pin
chinakknd1-Jul-07 15:35
chinakknd1-Jul-07 15:35 
QuestionVirtual keyboard losing window focus. Help! Pin
remarkpk111-Jul-07 13:45
remarkpk111-Jul-07 13:45 
AnswerRe: Virtual keyboard losing window focus. Help! Pin
Steve Echols1-Jul-07 17:55
Steve Echols1-Jul-07 17:55 

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.