Ejemplo n.º 1
0
        /// <summary>
        /// Constuctor.
        /// </summary>
        /// <param name="value">Big integer value in MSB.</param>
        public GXBigInteger(string value)
        {
            negative = value.StartsWith("-");
            GXByteBuffer bb = new GXByteBuffer();

            bb.SetHexString(value);
            FromByteBuffer(bb);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get image identifier.
        /// </summary>
        /// <returns></returns>
        public byte[] GetImageIdentifier()
        {
            GXByteBuffer bb = new GXByteBuffer();

            if (AsciiCb.Checked)
            {
                bb.Set(ASCIIEncoding.ASCII.GetBytes(IdentificationTb.Text));
            }
            else
            {
                bb.SetHexString(IdentificationTb.Text);
            }
            if (AddSignatureToIdentifier)
            {
                bb.SetHexString(SignatureTb.Text);
            }
            return(bb.Array());
        }