CASCExplorer.Jenkins96.ComputeHash C# (CSharp) Method

ComputeHash() public method

public ComputeHash ( string str, bool fix = true ) : ulong
str string
fix bool
return ulong
        public ulong ComputeHash(string str, bool fix = true)
        {
            if (fix)
            {
                var tempstr = str.Replace('/', '\\').ToUpperInvariant();
                byte[] data = Encoding.ASCII.GetBytes(tempstr);
                ComputeHash(data);
                return hashValue;
            }
            else
            {
                byte[] data = Encoding.ASCII.GetBytes(str);
                ComputeHash(data);
                return hashValue;
            }
        }

Usage Example

Example #1
0
        public bool FileExis(string file)
        {
            var hash      = Hasher.ComputeHash(file);
            var rootInfos = GetRootInfo(hash);

            return(rootInfos != null && rootInfos.Count > 0);
        }
All Usage Examples Of CASCExplorer.Jenkins96::ComputeHash