Ejemplo n.º 1
0
        private void DoCompare(Object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            if (DemoMode)
            {
                e.Result = DemoResult;
            }
            else
            {
                try
                {
                    wgssDSV.SignatureVerifier verifier = new wgssDSV.SignatureVerifier();
                    wgssDSV.Options           opt      = (wgssDSV.Options)e.Argument;

                    verifier.license = DsvLicense;
                    verifier.setReferenceSignature(SigRef);
                    verifier.setTestSignature(SigTest);

                    e.Result = verifier.compare();
                }
                catch (Exception ex)
                {
                    e.Result           = ex;
                    VerificationPass   = false;
                    VerificationResult = null;
                    VerificationStatus = Status.Error;
                    ErrorMessage       = ex.Message;
                    if (VerificationCompleteEvent != null)
                    {
                        VerificationCompleteEvent(this, null);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public CompareResult Verify(SigObj sigRef, SigObj sigTest)
        {
            try
            {
                wgssDSV.SignatureVerifier verifier = new wgssDSV.SignatureVerifier();
                wgssDSV.Options           opt      = new wgssDSV.Options();
                opt = readOptions();

                verifier.license = DsvLicense;
                verifier.setReferenceSignature(sigRef);
                verifier.setTestSignature(sigTest);

                return(verifier.compare());
            }
            catch (Exception ex)
            {
                VerificationPass   = false;
                VerificationResult = null;
                VerificationStatus = Status.Error;
                ErrorMessage       = ex.Message;
                if (VerificationCompleteEvent != null)
                {
                    VerificationCompleteEvent(this, null);
                }
                return(null);
            }
        }