Пример #1
0
        public int Verify(FingerPrintMatchInputModel input)
        {
            InitializeDevice();

            int   matchedRecord = 0;
            Int32 err           = 0;

            Byte[] fingerprint = Convert.FromBase64String(input.FingerPrintTemplate);

            foreach (var data in input.FingerPrintTemplateListToMatch)
            {
                SGFPMISOTemplateInfo sample_info = new SGFPMISOTemplateInfo();

                byte[] byteTemplate = Convert.FromBase64String(data.Template);
                err = m_FPM.GetIsoTemplateInfo(byteTemplate, sample_info);

                for (int i = 0; i < sample_info.TotalSamples; i++)
                {
                    bool matched = false;
                    err = m_FPM.MatchIsoTemplate(byteTemplate, i, fingerprint, 0, m_SecurityLevel, ref matched);
                    if (matched)
                    {
                        matchedRecord = data.PatienId;
                        break;
                    }
                }
            }

            return(matchedRecord);
        }
Пример #2
0
        public string MatchFingerPrint(FingerPrintMatchInputModel input)
        {
            var fingerPrintFacade = new FingerPrintFacade();
            var matchedStaffId    = fingerPrintFacade.Verify(input);

            return(JsonConvert.SerializeObject(new
            {
                PatientId = matchedStaffId,
                Matched = matchedStaffId != ""
            }));
        }