GetDerEncoded() public method

public GetDerEncoded ( ) : byte[]
return byte[]
Exemplo n.º 1
0
 private static void WriteEncodable(MemoryStream ms, Asn1Encodable e)
 {
     if (e != null)
     {
         byte[] bs = e.GetDerEncoded();
         ms.Write(bs, 0, bs.Length);
     }
 }
Exemplo n.º 2
0
        public DerApplicationSpecific(
            bool isExplicit,
            int tag,
            Asn1Encodable obj)
        {
            byte[] data = obj.GetDerEncoded();

            this.isConstructed = isExplicit;
            this.tag           = tag;

            if (isExplicit)
            {
                this.octets = data;
            }
            else
            {
                int    lenBytes = GetLengthOfLength(data);
                byte[] tmp      = new byte[data.Length - lenBytes];
                Array.Copy(data, lenBytes, tmp, 0, tmp.Length);
                this.octets = tmp;
            }
        }
        public DerApplicationSpecific(
			bool			isExplicit,
			int				tag,
			Asn1Encodable	obj)
        {
            byte[] data = obj.GetDerEncoded();

            this.isConstructed = isExplicit;
            this.tag = tag;

            if (isExplicit)
            {
                this.octets = data;
            }
            else
            {
                int lenBytes = GetLengthOfLength(data);
                byte[] tmp = new byte[data.Length - lenBytes];
                Array.Copy(data, lenBytes, tmp, 0, tmp.Length);
                this.octets = tmp;
            }
        }
Exemplo n.º 4
0
 public DerBitString(
     Asn1Encodable obj)
 {
     this.data = obj.GetDerEncoded();
     //this.padBits = 0;
 }
 private static void WriteEncodable(MemoryStream ms, Asn1Encodable e)
 {
     if (e != null)
     {
         byte[] bs = e.GetDerEncoded();
         ms.Write(bs, 0, bs.Length);
     }
 }
        public DerBitString(
			Asn1Encodable obj)
        {
            this.data = obj.GetDerEncoded();
            //this.padBits = 0;
        }