Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
XOR从概念上讲,我有点困惑。我有一个需要解密的轻型加密功能,但我不确定如何让它正常工作。
XOR
如果我的价值最初是由以下产生的:
$val = dechex($seed^$id);
那么,在别处,我有对应的$val和$seed,如何生成$id呢?
XOR 是它自己的逆,所以你可以再次 XOR 并$val得到. 不过,您可能需要先运行。$seed$idhexdec$val
$val
$seed
$id
hexdec