public BERtag(byte b) { // decoding 8.1.2.4.3 for small tag values atp = (BERtype)(((uint)b & 0xc0) >> 6); comp = ((b & 0x20) != 0); tag = (ulong)(b & 0x1f); if (tag == 0x1f) { throw (new Exception("BER bad byte tag")); } }
public BERtag(Stream s) { // decoding 8.1.2.4.3 byte b = ReadByte(s); atp = (BERtype)((b & 0xc0) >> 6); comp = ((b & 0x20) != 0); tag = (ulong)(b & 0x1f); if ((b & 0x1f) == 0x1f) { tag = GetBigTag(s); } }
} // EndMarker public BERtag(BERtype a, bool c, ulong t) { atp = a; comp = c; tag = t; }
public BERtag() { atp = BERtype.Universal; comp = false; tag = 0; } // EndMarker