Move image and sector verification methods to new interfaces.

This commit is contained in:
2019-01-20 22:24:15 +00:00
parent 640c57b87a
commit 6b1aeb6cbb
96 changed files with 1756 additions and 1602 deletions

View File

@@ -247,27 +247,5 @@ namespace DiscImageChef.DiscImages
public byte[] ReadSectorsLong(ulong sectorAddress, uint length) =>
throw new NotImplementedException("Flux decoding is not yet implemented.");
public bool? VerifySector(ulong sectorAddress) =>
throw new NotImplementedException("Flux decoding is not yet implemented.");
public bool? VerifySectors(ulong sectorAddress, uint length, out List<ulong> failingLbas,
out List<ulong> unknownLbas) =>
throw new NotImplementedException("Flux decoding is not yet implemented.");
public bool? VerifyMediaImage()
{
if(Header.flags.HasFlag(ScpFlags.Writable)) return null;
byte[] wholeFile = new byte[scpStream.Length];
uint sum = 0;
scpStream.Position = 0;
scpStream.Read(wholeFile, 0, wholeFile.Length);
for(int i = 0x10; i < wholeFile.Length; i++) sum += wholeFile[i];
return Header.checksum == sum;
}
}
}