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); }
public static bool CheckFileIntegrity() { var hash = ChecksumConfig.PerformHashing(InstallFolder); return(MilvanethConfig.Store.Checksum?.Validate(hash) ?? true); }