// Writeback Validity public override string MiscSaveChecks() { var r = new StringBuilder(); // MemeCrypto check if (RequiresMemeCrypto && !MemeCrypto.CanUseMemeCrypto()) { r.AppendLine("Platform does not support required cryptography providers."); r.AppendLine("Checksum will be broken until the file is saved using an OS without FIPS compliance enabled or a newer OS."); r.AppendLine(); } // FFFF checks byte[] FFFF = Enumerable.Repeat((byte)0xFF, 0x200).ToArray(); for (int i = 0; i < Data.Length / 0x200; i++) { if (!FFFF.SequenceEqual(Data.Skip(i * 0x200).Take(0x200))) { continue; } r.AppendLine($"0x200 chunk @ 0x{(i * 0x200).ToString("X5")} is FF'd."); r.AppendLine("Cyber will screw up (as of August 31st 2014)."); r.AppendLine(); // Check to see if it is in the Pokedex if (i * 0x200 > PokeDex && i * 0x200 < PokeDex + 0x900) { r.Append("Problem lies in the Pokedex. "); if (i * 0x200 == PokeDex + 0x400) { r.Append("Remove a language flag for a species < 585, ie Petilil"); } } break; } return(r.ToString()); }
public static byte[] Resign7(byte[] sav7) { return(MemeCrypto.Resign(sav7, false)); }