Ejemplo n.º 1
0
        ///
        /// WiFiDB API Functions
        ///
        public int CheckFileHash(string query)
        {
            TraceLogObj.WriteToLog(_ThreadName, ObjectName, GetCurrentMethod(), "Start Call: CheckFileHash");
            string APIResponse = WDBAPIObj.CheckFileHash(query);

            TraceLogObj.WriteToLog(_ThreadName, ObjectName, GetCurrentMethod(), "IsFileImported Response: " + APIResponse);
            string response = WDBAPIObj.ParseApiResponse(APIResponse);

            string[] stringSeparators = new string[] { "|~|" };
            string[] split            = response.Split(stringSeparators, StringSplitOptions.None);
            TraceLogObj.WriteToLog(_ThreadName, ObjectName, GetCurrentMethod(), "split[1].ToLower(): " + split[1].ToLower());

            if (split[1].ToLower() == "hash not found in wifidb")
            {
                TraceLogObj.WriteToLog(_ThreadName, ObjectName, GetCurrentMethod(), "End Call: CheckFileHash: Hash Not Found");
                return(0);
            }
            else
            {
                TraceLogObj.WriteToLog(_ThreadName, ObjectName, GetCurrentMethod(), "End Call: CheckFileHash: Hash Found");
                return(1);
            }
        }