Campbell BMP5 Informações Técnicas Página 64

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 100
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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 página 63
1 2 ... 59 60 61 62 63 64 65 66 67 68 69 ... 99 100

Comentários a estes Manuais

Sem comentários