Campbell BMP5 Información técnica Pagina 64

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 100
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 63
Appendix B. Calculating Packet Signatures and the Signature Nullifier
B-2
uint2 new_seed = (sig << 1)&0x1FF;
byte null1;
uint2 new_sig = sig;
if(new_seed >= 0x0100)
new_seed++;
null1 = (byte)(0x0100 - (new_seed + (sig >> 8)));
new_sig = calcSigFor(&null1,1,sig);
// now perform the same calculation for the most significant byte
// in the signature. This time we will use the signature that was
// calculated using the first null byte
byte null2;
new_seed = (new_sig << 1)&0x01FF;
if(new_seed >= 0x0100)
new_seed++;
null2 = (byte)(0x0100 - (new_seed + (new_sig >> 8)));
// now form the return value placing null in the most
// significant byte location
uint2 rtn = null1;
rtn <<= 8;
rtn += null2;
return rtn;
}// calcSigNullifier
Vista de pagina 63
1 2 ... 59 60 61 62 63 64 65 66 67 68 69 ... 99 100

Comentarios a estos manuales

Sin comentarios