Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16:
| /* Clear checksum. */ For i = 0 to 15 do: Set C[i] to 0. end /* of loop on i */
Set L to 0.
/* Process each 16-word block. */ For i = 0 to N/16-1 do /* Checksum block i. */ For j = 0 to 15 do Set c to M[i*16+j]. Set C[j] to S[c xor L] xor C[j]. Set L to C[j]. end /* of loop on j */ end /* of loop on i */ |
Weiß nich ob das hilft, aber mein Problem ist, dass alle Variablen und auch Arrays
als Bytes deklariert sind, nur M[0..N-1] ist die Datei.
Weiß nicht wie ich die Datei in c einlesen soll, da M[..] als eigentlich einen string
darstellt, weil es sich ja um eine Textdatei handelt.
Moderiert von
Christian S.: Code-Tags hinzugefügt.