Theshould beCode:else { col = i; }because you are wanting the numeric equivalent of digits '0' to '9'.Code:else col = input[i] - '0'
Also you'd want to output 'sbox[0][col]', NOT indexed by input[col].
Theshould beCode:else { col = i; }because you are wanting the numeric equivalent of digits '0' to '9'.Code:else col = input[i] - '0'
Also you'd want to output 'sbox[0][col]', NOT indexed by input[col].