Example #1
0
        public override BiometricsInformationRecord ProcessPrematchData(BiometricsInformationRecord sampleBir, BiometricsInformationRecord prematchDataBir)
        {
            string ProcessedBIR = "";

            VerifyResult(_cco.ProcessPrematchData(InteropCommon.ToStringFromByteArray(ToByteArrayFromBiometricsInformationRecord(sampleBir), _binaryConversion), InteropCommon.ToStringFromByteArray(ToByteArrayFromBiometricsInformationRecord(prematchDataBir), _binaryConversion), ProcessedBIR));
            return(ToBiometricsInformationRecordFromString(ProcessedBIR));
        }
Example #2
0
        private string[] ToStringArrayFromBiometricsInformationRecords(IEnumerable <BiometricsInformationRecord> birPopulation)
        {
            if (birPopulation == null)
            {
                return(null);
            }

            string[] Result = null;

            try
            {
                List <string> BIRStringList = new List <string>();

                foreach (BiometricsInformationRecord BIR in birPopulation)
                {
                    string BIRString = InteropCommon.ToStringFromByteArray(ToByteArrayFromBiometricsInformationRecord(BIR), _binaryConversion);

                    if (!string.IsNullOrEmpty(BIRString))
                    {
                        BIRStringList.Add(BIRString);
                    }
                }

                if (BIRStringList.Count > 0)
                {
                    Result = BIRStringList.ToArray();
                }
            }
            catch
            {
                ;
            }

            return(Result);
        }
Example #3
0
        public override void LockTag(byte[] tagId, int timeout, byte[] password)
        {
            string sTagID    = InteropCommon.ToStringFromByteArray(tagId, _binaryConversion);
            string sPassword = InteropCommon.ToStringFromByteArray(password, _binaryConversion);

            VerifyResult(_cco.LockTag(sTagID, timeout, sPassword));
        }
Example #4
0
        public override void WriteData(SmartCardWriteAction action, byte[] data)
        {
            int    iCount = data.GetLength(0);
            string sData  = InteropCommon.ToStringFromByteArray(data, _binaryConversion);

            VerifyResult(_cco.WriteData((int)action, iCount, sData));
        }
Example #5
0
        public override void WriteTagId(byte[] sourceTagId, byte[] destinationTagId, int timeout, byte[] password)
        {
            string sSourceID = InteropCommon.ToStringFromByteArray(sourceTagId, _binaryConversion);
            string sDestID   = InteropCommon.ToStringFromByteArray(destinationTagId, _binaryConversion);
            string sPassword = InteropCommon.ToStringFromByteArray(password, _binaryConversion);

            VerifyResult(_cco.WriteTagID(sSourceID, sDestID, timeout, sPassword));
        }
Example #6
0
        public override void WriteTagData(byte[] tagId, byte[] userData, int start, int timeout, byte[] password)
        {
            string sTagID    = InteropCommon.ToStringFromByteArray(tagId, _binaryConversion);
            string sUserData = InteropCommon.ToStringFromByteArray(userData, _binaryConversion);
            string sPassword = InteropCommon.ToStringFromByteArray(password, _binaryConversion);

            VerifyResult(_cco.WriteTagData(sTagID, sUserData, start, timeout, sPassword));
        }
Example #7
0
        public override void StartReadTags(RFIDReadOptions cmd, byte[] filterId, byte[] filterMask, int start, int length, byte[] password)
        {
            string sFilterID   = InteropCommon.ToStringFromByteArray(filterId, _binaryConversion);
            string sFilterMask = InteropCommon.ToStringFromByteArray(filterMask, _binaryConversion);
            string sPassword   = InteropCommon.ToStringFromByteArray(password, _binaryConversion);

            VerifyResult(_cco.StartReadTags((int)cmd, sFilterID, sFilterMask, start, length, sPassword));
        }
Example #8
0
        public override byte[] ReadData(SmartCardReadAction action, byte[] data)
        {
            int    iCount = 0;
            string sData  = InteropCommon.ToStringFromByteArray(data, _binaryConversion);

            VerifyResult(_cco.ReadData((int)action, ref iCount, ref sData));
            return(InteropCommon.ToByteArrayFromString(sData, _binaryConversion));
        }
Example #9
0
 public override void PrintMemoryBitmap(PrinterStation station, Bitmap data, int width, int alignment)
 {
     using (MemoryStream ms = new MemoryStream())
     {
         data.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
         string memorybitmap = InteropCommon.ToStringFromByteArray(ms.ToArray(), _binaryConversion);
         VerifyResult(_cco.PrintMemoryBitmap((int)station, memorybitmap, (int)OPOSPOSPrinterConstants.PTR_BMT_BMP, width, alignment));
     }
 }
Example #10
0
        public override void WriteTracks(byte[] track1Data, byte[] track2Data, byte[] track3Data, byte[] track4Data, int timeout)
        {
            List <string> TrackData = new List <string>();

            TrackData.Add(InteropCommon.ToStringFromByteArray(track1Data, _binaryConversion));
            TrackData.Add(InteropCommon.ToStringFromByteArray(track2Data, _binaryConversion));
            TrackData.Add(InteropCommon.ToStringFromByteArray(track3Data, _binaryConversion));
            TrackData.Add(InteropCommon.ToStringFromByteArray(track4Data, _binaryConversion));
            VerifyResult(_cco.WriteTracks(TrackData.ToArray(), timeout));
        }
Example #11
0
 public override void Write(int handle, byte[] data, int offset, int count)
 {
     VerifyResult(_cco.Write(handle, InteropCommon.ToStringFromByteArray(data, _binaryConversion), offset, count));
 }
Example #12
0
        public override void DeauthenticateDevice(byte[] responseToken)
        {
            string sValue = InteropCommon.ToStringFromByteArray(responseToken, _binaryConversion);

            VerifyResult(_cco.DeauthenticateDevice(sValue));
        }
Example #13
0
        public override BiometricsVerifyResult VerifyMatch(int maximumFalseAcceptRateRequested, int maximumFalseRejectRateRequested, bool falseAcceptRatePrecedence, BiometricsInformationRecord sampleBir, BiometricsInformationRecord referenceBir, bool adaptBir)
        {
            string AdaptedBIRString = adaptBir ? "" : null;

            int[] CandidateRanking = new int[1] {
                0
            };
            bool   Result      = false;
            int    FARArchived = 0;
            int    FRRArchived = 0;
            string Payload     = "";

            VerifyResult(_cco.VerifyMatch(maximumFalseAcceptRateRequested, maximumFalseRejectRateRequested, falseAcceptRatePrecedence, InteropCommon.ToStringFromByteArray(ToByteArrayFromBiometricsInformationRecord(sampleBir), _binaryConversion), InteropCommon.ToStringFromByteArray(ToByteArrayFromBiometricsInformationRecord(referenceBir), _binaryConversion), AdaptedBIRString, Result, FARArchived, FRRArchived, Payload));
            BiometricsInformationRecord AdaptedBIR = null;

            if (adaptBir && !string.IsNullOrEmpty(AdaptedBIRString))
            {
                AdaptedBIR = ToBiometricsInformationRecordFromString(AdaptedBIRString);
            }

            return(new BiometricsVerifyResult(Result, FARArchived, FRRArchived, AdaptedBIR, InteropCommon.ToByteArrayFromString(Payload, _binaryConversion)));
        }
Example #14
0
 public override int[] IdentifyMatch(int maximumFalseAcceptRateRequested, int maximumFalseRejectRateRequested, bool falseAcceptRatePrecedence, BiometricsInformationRecord sampleBir, IEnumerable <BiometricsInformationRecord> referenceBirPopulation)
 {
     string[] ReferenceBIRPopulation = ToStringArrayFromBiometricsInformationRecords(referenceBirPopulation);
     int[]    CandidateRanking       = new int[1] {
         0
     };
     VerifyResult(_cco.IdentifyMatch(maximumFalseAcceptRateRequested, maximumFalseRejectRateRequested, falseAcceptRatePrecedence, InteropCommon.ToStringFromByteArray(ToByteArrayFromBiometricsInformationRecord(sampleBir), _binaryConversion), ReferenceBIRPopulation, CandidateRanking));
     return(CandidateRanking);
 }
Example #15
0
 public override void BeginEnrollCapture(BiometricsInformationRecord referenceBir, byte[] payload)
 {
     VerifyResult(_cco.BeginEnrollCapture(InteropCommon.ToStringFromByteArray(ToByteArrayFromBiometricsInformationRecord(referenceBir), _binaryConversion), InteropCommon.ToStringFromByteArray(payload, _binaryConversion)));
 }
Example #16
0
        public override void StopReadTags(byte[] password)
        {
            string sPassword = InteropCommon.ToStringFromByteArray(password, _binaryConversion);

            VerifyResult(_cco.StopReadTags(sPassword));
        }
 public override void DefineGlyph(int glyphCode, byte[] glyph)
 {
     VerifyResult(_cco.DefineGlyph(glyphCode, InteropCommon.ToStringFromByteArray(glyph, _binaryConversion)));
 }