internal override void Encode( DerOutputStream derOut) { OidTokenizer tok = new OidTokenizer(identifier); MemoryStream bOut = new MemoryStream(); DerOutputStream dOut = new DerOutputStream(bOut); string token = tok.NextToken(); int first = int.Parse(token); token = tok.NextToken(); int second = int.Parse(token); WriteField(bOut, first * 40 + second); while (tok.HasMoreTokens) { token = tok.NextToken(); if (token.Length < 18) { WriteField(bOut, Int64.Parse(token)); } else { WriteField(bOut, new BigInteger(token)); } } dOut.Close(); derOut.WriteEncoded(Asn1Tags.ObjectIdentifier, bOut.ToArray()); }