Well the comment above explains what it's doing, but if you're looking for a breakdown of the operators:
- Perform a bitwise
and on
salt[i] and a hex number (the & operator).
- Perform a bitwise
and on salt[i]
and a second hex number.
- Perform a bitwise
or on the result of steps 1 and 2 (the | operator).
- Cast the result of step 3 to a
byte
- Store the result in
salt[i]
The result is what is noted in the comment block. The numbers of the format 0xc0 and whatnot are in hexadecimal, which is base 16. I.e. c0 in hex is equivalent to 16*12 + 16*0 = 192 in decimal. In hex, since you run out of digits at 9, you begin using letters. Thus, a=10, b=11, c=12, d=13, e=14, f=15, and f becomes the highest "digit" since you would move over by one place when you get to 16 (as 16 is the base).
See also: