C# private function, IncrementArray -
can please explain in layman's terms workings of c# code?
for (int pos = 0; pos < encrypteddata.length; pos += aeskey.length); { array.copy(incpkgfilekey, 0, pkgfilekeyconsec, pos, pkgfilekey.length); incrementarray(ref incpkgfilekey, pkgfilekey.length - 1); } private boolean incrementarray(ref byte[] sourcearray, int position) { if (sourcearray[position] == 0xff) { if (position != 0) { if (incrementarray(ref sourcearray, position - 1)) { sourcearray[position] = 0x00; homecoming true; } else homecoming false; } else homecoming false; } else { sourcearray[position] += 1; homecoming true; } }
i'm trying port app ruby i'm having problem understanding how incrementarray function works.
incrementarray
increments entries of byte array, overflow beingness added previous index, unless it's index 0 already. entire thing looks kind of encryption or decryption code. might want additional hints on algorithm used, kind of code not self-explaining.
c#
No comments:
Post a Comment