Exemplo n.º 1
0
        internal static void SetConfigStore(ConfigStore conf, string runChecksumAgainstPath)
        {
            if (!string.IsNullOrWhiteSpace(runChecksumAgainstPath))
            {
                conf.Checksum = ChecksumConfig.PerformHashing(runChecksumAgainstPath);
            }
            else
            {
                conf.Checksum = null;
            }
            var path = Helper.GetMilFilePathRaw("apidef.pack");
            var ser  = new Serializer <ConfigStore>(path, "");

            ser.Save(conf);
        }
Exemplo n.º 2
0
        public static bool CheckFileIntegrity()
        {
            var hash = ChecksumConfig.PerformHashing(InstallFolder);

            return(MilvanethConfig.Store.Checksum?.Validate(hash) ?? true);
        }