public static void PatchISO(Stream file, IEnumerable <PatcherLib.Datatypes.PatchedByteArray> patches) { PspIsoInfo info = PspIsoInfo.GetPspIsoInfo(file); DecryptISO(file, info); patches.ForEach(p => ApplyPatch(file, info, p)); }
/// <summary> /// Decrypts the ISO. /// </summary> /// <param name="filename">The filename of the ISO to decrypt.</param> public static void DecryptISO(string filename) { FileStream stream = null; try { stream = new FileStream(filename, FileMode.Open); PspIsoInfo info = PspIsoInfo.GetPspIsoInfo(stream); DecryptISO(stream, info); } catch (NotSupportedException) { throw; } finally { if (stream != null) { stream.Flush(); stream.Close(); stream = null; } } }
public override void PatchIso(Stream iso, IList <byte> bytes) { PspIso.ApplyPatch(iso, PspIsoInfo.GetPspIsoInfo(iso), GetPatchedByteArray(bytes.ToArray())); }
public override byte[] ReadIso(Stream iso) { return(ReadIso(iso, PspIsoInfo.GetPspIsoInfo(iso))); }