Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

WORD PASNObject::GetASNLengthLength ( WORD  length  )  [static, inherited]

Return the length of an encoded ASN length value

Parameters:
length  length to find length of

Definition at line 250 of file pasn.cxx.

Referenced by PASNObject::GetASNHeaderLength(), and PASNObject::GetASNSequenceStartLength().

{
  // handle lengths less then 128
  if (length < 128) 
    return 1;

  // handle lengths less than 256
  else if (length < 256) 
    return 2;

  // handle lengths up to 0xffff
  else 
    return 3;
}


Generated by  Doxygen 1.6.0   Back to index