Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DC Algorithm in JavaScript (decrypt)
#2
Thanks for answering, man.

I'm not sure, but I think the problem I couldn't read the file as well before is because I'm just calling a function with a argument of string, where I use a string with the binary content of the criminal.dat, but I don't use XMLHttpRequest or any other thing to get the file content... I just paste it.

Your code works as well! You can change the line to make the loop more faster, though.

Code:
for (var i = 123, j = 0; i < data.length; i++, j++)

to

Code:
for (var i = 123, j = 0, len = data.length; i < len; i++, j++)

(Because, in JavaScript, the for numeral loop limit is always calculated, then the data string length will be calculated everytime, also.)
Reply
Thanks given by: MangaD , Rhino.Freak , kairunotabi


Messages In This Thread
DC Algorithm in JavaScript (decrypt) - by MangaD - 04-15-2016, 07:22 PM
RE: DC Algorithm in JavaScript (decrypt) - by Hydroper - 04-15-2016, 07:44 PM



Users browsing this thread: 2 Guest(s)