Example #1
0
        private static bool SetFileMD5(string path, string hash)
        {
            if (!XLPack.IsFileExist(path))
            {
                return(false);
            }

            XLPack.afs_md5_ctx md5info = new XLPack.afs_md5_ctx();
            md5info.md5 = StringToByteArray(hash);
            var position = XLPack.FOpen(path, "r");
            // fsetmd5 00001111222233334444555566667777 /master/bin32/zlib1.dll
            var res = XLPack.FSetMD5(position, ref md5info);

            XLPack.FClose(ref position);
            return(res);
        }