What does it mean to "XOR a string by 32 bits"? Does that mean "XOR a 4-byte string with a 32-bit value"? If so,
unpack('N', $s) ^ $val # Big-endian byte order -or- unpack('V', $s) ^ $val # Little-endian byte order
What does it mean to "take the inverse of the XOR result as a hexadecimal value"? Hexadecimal is a string representation of a number, and strings don't have inverses.
In reply to Re: Perl XOR
by ikegami
in thread Perl XOR
by fixu2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |