private static final byte[] BitPMC1 = { 56, 48, 40, 32, 24, 16, 8, 0, 57,
49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51,
43, 35, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13,
5, 60, 52, 44, 36, 28, 20, 12, 4, 27, 19, 11, 3 };
byte[] outData= new byte[] { 0, 0, 0, 0, 0, 0, 0 };
for (int i = 0; i < 56; i++) {
if ((inData[BitPMC1[i] >> 3] & (1 << (7 - (BitPMC1[i] & 0x07)))) != 0) {
outData[i >> 3] |= (1 << (7 - (i & 0x07)));
}
}
java outData[i >> 3] and c# different