mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Refactor: Move Checksum to Core.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2017-05-27 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* Checksum.cs:
|
||||||
|
* DiscImageChef.Core.csproj: Refactor: Move Checksum to Core.
|
||||||
|
|
||||||
2017-05-27 Natalia Portillo <claunia@claunia.com>
|
2017-05-27 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* Statistics.cs:
|
* Statistics.cs:
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ using System.Threading;
|
|||||||
|
|
||||||
namespace DiscImageChef.Core
|
namespace DiscImageChef.Core
|
||||||
{
|
{
|
||||||
class Checksum
|
public class Checksum
|
||||||
{
|
{
|
||||||
Adler32Context adler32ctx;
|
Adler32Context adler32ctx;
|
||||||
CRC16Context crc16ctx;
|
CRC16Context crc16ctx;
|
||||||
@@ -75,7 +75,7 @@ namespace DiscImageChef.Core
|
|||||||
sha512Packet sha512Pkt;
|
sha512Packet sha512Pkt;
|
||||||
spamsumPacket spamsumPkt;
|
spamsumPacket spamsumPkt;
|
||||||
|
|
||||||
internal Checksum()
|
public Checksum()
|
||||||
{
|
{
|
||||||
adler32ctx = new Adler32Context();
|
adler32ctx = new Adler32Context();
|
||||||
crc16ctx = new CRC16Context();
|
crc16ctx = new CRC16Context();
|
||||||
@@ -137,7 +137,7 @@ namespace DiscImageChef.Core
|
|||||||
spamsumPkt.context = ssctx;
|
spamsumPkt.context = ssctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Update(byte[] data)
|
public void Update(byte[] data)
|
||||||
{
|
{
|
||||||
adlerPkt.data = data;
|
adlerPkt.data = data;
|
||||||
adlerThread.Start(adlerPkt);
|
adlerThread.Start(adlerPkt);
|
||||||
@@ -184,7 +184,7 @@ namespace DiscImageChef.Core
|
|||||||
spamsumThread = new Thread(updateSpamSum);
|
spamsumThread = new Thread(updateSpamSum);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal List<ChecksumType> End()
|
public List<ChecksumType> End()
|
||||||
{
|
{
|
||||||
List<ChecksumType> chks = new List<ChecksumType>();
|
List<ChecksumType> chks = new List<ChecksumType>();
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ namespace DiscImageChef.Core
|
|||||||
return chks;
|
return chks;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static List<ChecksumType> GetChecksums(byte[] data)
|
public static List<ChecksumType> GetChecksums(byte[] data)
|
||||||
{
|
{
|
||||||
Adler32Context adler32ctxData = new Adler32Context();
|
Adler32Context adler32ctxData = new Adler32Context();
|
||||||
CRC16Context crc16ctxData = new CRC16Context();
|
CRC16Context crc16ctxData = new CRC16Context();
|
||||||
@@ -38,6 +38,7 @@
|
|||||||
<Compile Include="PluginBase.cs" />
|
<Compile Include="PluginBase.cs" />
|
||||||
<Compile Include="ImageFormat.cs" />
|
<Compile Include="ImageFormat.cs" />
|
||||||
<Compile Include="Statistics.cs" />
|
<Compile Include="Statistics.cs" />
|
||||||
|
<Compile Include="Checksum.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\DiscImageChef.Console\DiscImageChef.Console.csproj">
|
<ProjectReference Include="..\DiscImageChef.Console\DiscImageChef.Console.csproj">
|
||||||
@@ -72,6 +73,14 @@
|
|||||||
<Project>{F2B84194-26EB-4227-B1C5-6602517E85AE}</Project>
|
<Project>{F2B84194-26EB-4227-B1C5-6602517E85AE}</Project>
|
||||||
<Name>DiscImageChef.CommonTypes</Name>
|
<Name>DiscImageChef.CommonTypes</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\DiscImageChef.Checksums\DiscImageChef.Checksums.csproj">
|
||||||
|
<Project>{CC48B324-A532-4A45-87A6-6F91F7141E8D}</Project>
|
||||||
|
<Name>DiscImageChef.Checksums</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\DiscImageChef.Metadata\DiscImageChef.Metadata.csproj">
|
||||||
|
<Project>{9F213318-5CB8-4066-A757-074489C9F818}</Project>
|
||||||
|
<Name>DiscImageChef.Metadata</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
|
2017-05-27 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* DiscImageChef.csproj:
|
||||||
|
Refactor: Move Checksum to Core.
|
||||||
|
|
||||||
2017-05-27 Natalia Portillo <claunia@claunia.com>
|
2017-05-27 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* DiscImageChef.csproj:
|
* DiscImageChef.csproj:
|
||||||
|
|||||||
@@ -62,7 +62,6 @@
|
|||||||
<Compile Include="Commands\CreateSidecar.cs" />
|
<Compile Include="Commands\CreateSidecar.cs" />
|
||||||
<Compile Include="Commands\MediaScan.cs" />
|
<Compile Include="Commands\MediaScan.cs" />
|
||||||
<Compile Include="Commands\DumpMedia.cs" />
|
<Compile Include="Commands\DumpMedia.cs" />
|
||||||
<Compile Include="Core\Checksum.cs" />
|
|
||||||
<Compile Include="Commands\DeviceReport.cs" />
|
<Compile Include="Commands\DeviceReport.cs" />
|
||||||
<Compile Include="Commands\Configure.cs" />
|
<Compile Include="Commands\Configure.cs" />
|
||||||
<Compile Include="Commands\Statistics.cs" />
|
<Compile Include="Commands\Statistics.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user