//key & hash are both byte[]
int leftPos = 0, rightPos = 31;
while(leftPos < 16) {
//possible loss of precision. required: byte, found: int
key[leftPos] = hash[leftPos] ^ hash[rightPos];
leftPos++;
rightPos--;
}
为什么Java中两个字节的按位运算会返回一个int?我知道我可以将它转换回字节,但这似乎很愚蠢。