I have this app going that encrypts files as well as other things, and it is LIGHTNING quick..
But when I put a progress bar on the dialog box and then put the stepit command inside my RC4 encryption, which normally does a 5 meg file in less than 5 seconds, it bogs down and takes almost 30 seconds.
I also noticed this on the compression, took 5 times longer to compress a file...
Is this normal behavior?
Here's a snippet of what it's doing:
------------------
Scott
mailto:[email protected][email protected]</A>
But when I put a progress bar on the dialog box and then put the stepit command inside my RC4 encryption, which normally does a 5 meg file in less than 5 seconds, it bogs down and takes almost 30 seconds.
I also noticed this on the compression, took 5 times longer to compress a file...
Is this normal behavior?
Here's a snippet of what it's doing:
Code:
Control Add "msctls_progress32",pDlg,%PROGRESS2,"",5,25,185,12, %WS_CHILD Or %WS_VISIBLE Or %WS_CLIPSIBLINGS Or %CCS_BOTTOM 'In the function, a new thread function: Control Set Text pDlg,%FILECOPYLABEL1,"Encrypting data, Please wait.." Control Send pDlg, %PROGRESS2, %PBM_SETRANGE, 0 ,MakLng(0,Len(Buffer)) 'Halfway, compression is the other half Control Send pDlg, %PROGRESS2, %PBM_SETSTEP, 1 , 0 and inside the RC4 encryption scheme, without this SINGLE line of code it's back to 5 megs in 5 seconds or so (approx) For x = 0 To Len(St)-1 Control Send pDlg, %PROGRESS2, %PBM_STEPIT, 1 , 0 c = @p[x] i = (i + 1) Mod 256 j = (j + s(i)) Mod 256 Swap s(i), s(j) t = (s(i) + s(j)) Mod 256 k = s(t) @pp[fromEncPos] = c Xor k Incr fromEncPos Next
Scott
mailto:[email protected][email protected]</A>
Comment