public PublicKey(byte[] certData)
        {
            HSMPublicKey = certData;
            //HSMPublicKey = new byte[certData.Length - 2];
            //Array.Copy(certData, 2, HSMPublicKey, 0, certData.Length-2);
            //public certificate
            Asn1.Asn1Reader reader = new Asn1.Asn1Reader(certData);
            reader.MoveNext();
            byte[] FirstDataSeq = reader.GetPayload();

            string FirstDataSeqHex = HexByteUtils.ByteArrayToHex(FirstDataSeq);

            keyBytesData  = FirstDataSeq;
            keyStringData = FirstDataSeqHex;

            //public modulus
            reader.MoveNext();
            byte[] SecondDataSeq    = reader.GetTagRawData();
            string SecondDataSeqHex = HexByteUtils.ByteArrayToHex(SecondDataSeq);

            byte[] modulus = new byte[3];
            Array.Copy(SecondDataSeq, 2, modulus, 0, 3);


            //create modulus object
            mod = new Modulus(modulus);
        }
 /// <summary>
 /// Initializes a new instance of the <strong>ASN1</strong> class from an existing
 /// <strong>ASN1</strong> object.
 /// </summary>
 /// <param name="asn">An existing <strong>ASN1</strong> object.</param>
 /// <remarks>
 ///		This constructor creates a copy of a current position of an exisiting <strong>ASN1</strong> object.
 /// </remarks>
 public Asn1Reader(Asn1Reader asn) : this(asn.GetTagRawData())
 {
 }