Ejemplo n.º 1
0
        public Asn1OpenType(Asn1EncodeBuffer buffer)
        {
            if (buffer is Asn1BerEncodeBuffer)
            {
                _length = buffer.MsgLength;
                _encodeBuffer = buffer;
            }
            else
            {
                Value = buffer.MsgCopy;
            }

            _textEncoding = false;
        }
Ejemplo n.º 2
0
        public Asn1OpenType(Asn1EncodeBuffer buffer)
        {
            if (buffer is Asn1BerEncodeBuffer)
            {
                _length       = buffer.MsgLength;
                _encodeBuffer = buffer;
            }
            else
            {
                Value = buffer.MsgCopy;
            }

            _textEncoding = false;
        }
Ejemplo n.º 3
0
        private static int EncodeValue(Asn1EncodeBuffer buffer, BigInteger ivalue, bool doCopy)
        {
            var data   = ivalue.GetData();
            var length = data.Length;

            for (var i = length - 1; i >= 0; --i)
            {
                if (doCopy)
                {
                    buffer.Copy(data[i]);
                }
            }

            return(length);
        }
Ejemplo n.º 4
0
        private static int EncodeValue(Asn1EncodeBuffer buffer, BigInteger ivalue, bool doCopy)
        {
            var data = ivalue.GetData();
            var length = data.Length;

            for (var i = length - 1; i >= 0; --i)
            {
                if (doCopy)
                {
                    buffer.Copy(data[i]);
                }
            }

            return length;
        }