我这里有这段代码
#include<stdio.h>
#define LEN 10
char buf[] = {0xff,0xaa,0xfc,0xe8,0x89,0x00,0x00,0x00,0x60,0x89};
char key[] = "SAMPLE KEY";
int main()
{
int i;
char enc[LEN];
for(i=0;i<LEN;i++)
{
enc[i] = (key[i % LEN] ^ buf[i]);
printf("0x%x,",enc[i]);
}
}
哪个输出
输出
0xffffffac,0xffffffeb,0xffffffb1,0xffffffb8,0xffffffc5,0x45,0x20,0x4b,0x25,0xffffffd0
预期输出在哪里
0xac,0xeb,0xb1,0xb8,0xc5,0x45,0x20,0x4b,0x25,0xd0,
我怎样才能解决这个问题 ?为什么会这样?