2014-07-03 18:35:19 +01:00
|
|
|
|
/***************************************************************************
|
|
|
|
|
|
The Disc Image Chef
|
|
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
Filename : Checksum.cs
|
|
|
|
|
|
Version : 1.0
|
|
|
|
|
|
Author(s) : Natalia Portillo
|
|
|
|
|
|
|
|
|
|
|
|
Component : Verbs.
|
|
|
|
|
|
|
|
|
|
|
|
Revision : $Revision$
|
|
|
|
|
|
Last change by : $Author$
|
|
|
|
|
|
Date : $Date$
|
|
|
|
|
|
|
|
|
|
|
|
--[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
Implements the 'checksum' verb.
|
|
|
|
|
|
|
|
|
|
|
|
--[ License ] --------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
|
|
it under the terms of the GNU General Public License as
|
|
|
|
|
|
published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
|
|
Copyright (C) 2011-2014 Claunia.com
|
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
//$Id$
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using DiscImageChef.ImagePlugins;
|
|
|
|
|
|
using DiscImageChef.Checksums;
|
|
|
|
|
|
using System.Collections.Generic;
|
2015-10-18 22:04:03 +01:00
|
|
|
|
using DiscImageChef.Console;
|
2014-06-16 01:45:04 +01:00
|
|
|
|
|
|
|
|
|
|
namespace DiscImageChef.Commands
|
|
|
|
|
|
{
|
|
|
|
|
|
public static class Checksum
|
|
|
|
|
|
{
|
|
|
|
|
|
public static void doChecksum(ChecksumSubOptions options)
|
|
|
|
|
|
{
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--debug={0}", options.Debug);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--verbose={0}", options.Verbose);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--separated-tracks={0}", options.SeparatedTracks);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--whole-disc={0}", options.WholeDisc);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--input={0}", options.InputFile);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--adler32={0}", options.DoAdler32);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--crc16={0}", options.DoCRC16);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--crc32={0}", options.DoCRC32);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--crc64={0}", options.DoCRC64);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--md5={0}", options.DoMD5);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--ripemd160={0}", options.DoRIPEMD160);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--sha1={0}", options.DoSHA1);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--sha256={0}", options.DoSHA256);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--sha384={0}", options.DoSHA384);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--sha512={0}", options.DoSHA512);
|
|
|
|
|
|
DicConsole.DebugWriteLine("Checksum command", "--spamsum={0}", options.DoSpamSum);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
|
|
|
|
|
|
ImagePlugin inputFormat = ImageFormat.Detect(options.InputFile);
|
|
|
|
|
|
|
|
|
|
|
|
if (inputFormat == null)
|
|
|
|
|
|
{
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.ErrorWriteLine("Unable to recognize image format, not checksumming");
|
2014-07-03 18:35:19 +01:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inputFormat.OpenImage(options.InputFile);
|
|
|
|
|
|
|
|
|
|
|
|
if (options.SeparatedTracks)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
List<Track> inputTracks = inputFormat.GetTracks();
|
|
|
|
|
|
foreach (Track currentTrack in inputTracks)
|
|
|
|
|
|
{
|
2015-04-19 01:07:12 +01:00
|
|
|
|
Adler32Context adler32ctxTrack = new Adler32Context();
|
2015-04-19 01:10:32 +01:00
|
|
|
|
CRC16Context crc16ctxTrack = new CRC16Context();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
CRC32Context crc32ctxTrack = new CRC32Context();
|
|
|
|
|
|
CRC64Context crc64ctxTrack = new CRC64Context();
|
2015-04-19 01:18:36 +01:00
|
|
|
|
Fletcher16Context fletcher16ctxTrack = new Fletcher16Context();
|
|
|
|
|
|
Fletcher32Context fletcher32ctxTrack = new Fletcher32Context();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
MD5Context md5ctxTrack = new MD5Context();
|
|
|
|
|
|
RIPEMD160Context ripemd160ctxTrack = new RIPEMD160Context();
|
|
|
|
|
|
SHA1Context sha1ctxTrack = new SHA1Context();
|
|
|
|
|
|
SHA256Context sha256ctxTrack = new SHA256Context();
|
|
|
|
|
|
SHA384Context sha384ctxTrack = new SHA384Context();
|
|
|
|
|
|
SHA512Context sha512ctxTrack = new SHA512Context();
|
2015-04-19 01:27:17 +01:00
|
|
|
|
SpamSumContext ssctxTrack = new SpamSumContext();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
|
2015-04-19 01:07:12 +01:00
|
|
|
|
if (options.DoAdler32)
|
|
|
|
|
|
adler32ctxTrack.Init();
|
2015-04-19 01:10:32 +01:00
|
|
|
|
if (options.DoCRC16)
|
|
|
|
|
|
crc16ctxTrack.Init();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoCRC32)
|
|
|
|
|
|
crc32ctxTrack.Init();
|
|
|
|
|
|
if (options.DoCRC64)
|
|
|
|
|
|
crc64ctxTrack.Init();
|
2015-04-19 01:18:36 +01:00
|
|
|
|
if (options.DoFletcher16)
|
|
|
|
|
|
fletcher16ctxTrack.Init();
|
|
|
|
|
|
if (options.DoFletcher32)
|
|
|
|
|
|
fletcher32ctxTrack.Init();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoMD5)
|
|
|
|
|
|
md5ctxTrack.Init();
|
|
|
|
|
|
if (options.DoRIPEMD160)
|
|
|
|
|
|
ripemd160ctxTrack.Init();
|
|
|
|
|
|
if (options.DoSHA1)
|
|
|
|
|
|
sha1ctxTrack.Init();
|
|
|
|
|
|
if (options.DoSHA256)
|
|
|
|
|
|
sha256ctxTrack.Init();
|
|
|
|
|
|
if (options.DoSHA384)
|
|
|
|
|
|
sha384ctxTrack.Init();
|
|
|
|
|
|
if (options.DoSHA512)
|
|
|
|
|
|
sha512ctxTrack.Init();
|
2015-04-19 01:27:17 +01:00
|
|
|
|
if (options.DoSpamSum)
|
|
|
|
|
|
ssctxTrack.Init();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
|
|
|
|
|
|
ulong sectors = currentTrack.TrackEndSector - currentTrack.TrackStartSector + 1;
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0} has {1} sectors", currentTrack.TrackSequence, sectors);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
|
|
|
|
|
|
for (ulong i = currentTrack.TrackStartSector; i <= currentTrack.TrackEndSector; i++)
|
|
|
|
|
|
{
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.Write("\rHashing sector {0} of track {1}", i + 1, currentTrack.TrackSequence);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
byte[] sector = inputFormat.ReadSector(i, currentTrack.TrackSequence);
|
2015-04-19 01:07:12 +01:00
|
|
|
|
if (options.DoAdler32)
|
|
|
|
|
|
adler32ctxTrack.Update(sector);
|
2015-04-19 01:10:32 +01:00
|
|
|
|
if (options.DoCRC16)
|
|
|
|
|
|
crc16ctxTrack.Update(sector);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoCRC32)
|
|
|
|
|
|
crc32ctxTrack.Update(sector);
|
|
|
|
|
|
if (options.DoCRC64)
|
|
|
|
|
|
crc64ctxTrack.Update(sector);
|
2015-04-19 01:18:36 +01:00
|
|
|
|
if (options.DoFletcher16)
|
|
|
|
|
|
fletcher16ctxTrack.Update(sector);
|
|
|
|
|
|
if (options.DoFletcher32)
|
|
|
|
|
|
fletcher32ctxTrack.Update(sector);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoMD5)
|
|
|
|
|
|
md5ctxTrack.Update(sector);
|
|
|
|
|
|
if (options.DoRIPEMD160)
|
|
|
|
|
|
ripemd160ctxTrack.Update(sector);
|
|
|
|
|
|
if (options.DoSHA1)
|
|
|
|
|
|
sha1ctxTrack.Update(sector);
|
|
|
|
|
|
if (options.DoSHA256)
|
|
|
|
|
|
sha256ctxTrack.Update(sector);
|
|
|
|
|
|
if (options.DoSHA384)
|
|
|
|
|
|
sha384ctxTrack.Update(sector);
|
|
|
|
|
|
if (options.DoSHA512)
|
|
|
|
|
|
sha512ctxTrack.Update(sector);
|
2015-04-19 01:27:17 +01:00
|
|
|
|
if (options.DoSpamSum)
|
|
|
|
|
|
ssctxTrack.Update(sector);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
|
2015-04-19 01:07:12 +01:00
|
|
|
|
if (options.DoAdler32)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s Adler-32: 0x{1}", currentTrack.TrackSequence, adler32ctxTrack.End());
|
2015-04-19 01:10:32 +01:00
|
|
|
|
if (options.DoCRC16)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s CRC16: 0x{1}", currentTrack.TrackSequence, crc16ctxTrack.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoCRC32)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s CRC32: 0x{1}", currentTrack.TrackSequence, crc32ctxTrack.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoCRC64)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s CRC64 (ECMA): 0x{1}", currentTrack.TrackSequence, crc64ctxTrack.End());
|
2015-04-19 01:18:36 +01:00
|
|
|
|
if (options.DoFletcher16)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s Fletcher-16: 0x{1}", currentTrack.TrackSequence, fletcher16ctxTrack.End());
|
2015-04-19 01:18:36 +01:00
|
|
|
|
if (options.DoFletcher32)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s Fletcher-32: 0x{1}", currentTrack.TrackSequence, fletcher32ctxTrack.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoMD5)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s MD5: {1}", currentTrack.TrackSequence, md5ctxTrack.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoRIPEMD160)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s RIPEMD160: {1}", currentTrack.TrackSequence, ripemd160ctxTrack.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoSHA1)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s SHA1: {1}", currentTrack.TrackSequence, sha1ctxTrack.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoSHA256)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s SHA256: {1}", currentTrack.TrackSequence, sha256ctxTrack.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoSHA384)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s SHA384: {1}", currentTrack.TrackSequence, sha384ctxTrack.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoSHA512)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s SHA512: {1}", currentTrack.TrackSequence, sha512ctxTrack.End());
|
2015-04-19 01:27:17 +01:00
|
|
|
|
if (options.DoSpamSum)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Track {0}'s SpamSum: {1}", currentTrack.TrackSequence, ssctxTrack.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (options.Debug)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.DebugWriteLine("Could not get tracks because {0}", ex.Message);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
else
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Unable to get separate tracks, not checksumming them");
|
2014-07-03 18:35:19 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (options.WholeDisc)
|
|
|
|
|
|
{
|
2015-04-19 01:07:12 +01:00
|
|
|
|
Adler32Context adler32ctx = new Adler32Context();
|
2015-04-19 01:10:32 +01:00
|
|
|
|
CRC16Context crc16ctx = new CRC16Context();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
CRC32Context crc32ctx = new CRC32Context();
|
|
|
|
|
|
CRC64Context crc64ctx = new CRC64Context();
|
2015-04-19 01:18:36 +01:00
|
|
|
|
Fletcher16Context fletcher16ctx = new Fletcher16Context();
|
|
|
|
|
|
Fletcher32Context fletcher32ctx = new Fletcher32Context();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
MD5Context md5ctx = new MD5Context();
|
|
|
|
|
|
RIPEMD160Context ripemd160ctx = new RIPEMD160Context();
|
|
|
|
|
|
SHA1Context sha1ctx = new SHA1Context();
|
|
|
|
|
|
SHA256Context sha256ctx = new SHA256Context();
|
|
|
|
|
|
SHA384Context sha384ctx = new SHA384Context();
|
|
|
|
|
|
SHA512Context sha512ctx = new SHA512Context();
|
2015-04-19 01:27:17 +01:00
|
|
|
|
SpamSumContext ssctx = new SpamSumContext();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
|
2015-04-19 01:07:12 +01:00
|
|
|
|
if (options.DoAdler32)
|
|
|
|
|
|
adler32ctx.Init();
|
2015-04-19 01:10:32 +01:00
|
|
|
|
if (options.DoCRC16)
|
|
|
|
|
|
crc16ctx.Init();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoCRC32)
|
|
|
|
|
|
crc32ctx.Init();
|
|
|
|
|
|
if (options.DoCRC64)
|
|
|
|
|
|
crc64ctx.Init();
|
2015-04-19 01:18:36 +01:00
|
|
|
|
if (options.DoFletcher16)
|
|
|
|
|
|
fletcher16ctx.Init();
|
|
|
|
|
|
if (options.DoFletcher32)
|
|
|
|
|
|
fletcher32ctx.Init();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoMD5)
|
|
|
|
|
|
md5ctx.Init();
|
|
|
|
|
|
if (options.DoRIPEMD160)
|
|
|
|
|
|
ripemd160ctx.Init();
|
|
|
|
|
|
if (options.DoSHA1)
|
|
|
|
|
|
sha1ctx.Init();
|
|
|
|
|
|
if (options.DoSHA256)
|
|
|
|
|
|
sha256ctx.Init();
|
|
|
|
|
|
if (options.DoSHA384)
|
|
|
|
|
|
sha384ctx.Init();
|
|
|
|
|
|
if (options.DoSHA512)
|
|
|
|
|
|
sha512ctx.Init();
|
2015-04-19 01:27:17 +01:00
|
|
|
|
if (options.DoSpamSum)
|
|
|
|
|
|
ssctx.Init();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
|
|
|
|
|
|
ulong sectors = inputFormat.GetSectors();
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Sectors {0}", sectors);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
|
|
|
|
|
|
for (ulong i = 0; i < sectors; i++)
|
|
|
|
|
|
{
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.Write("\rHashing sector {0}", i + 1);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
byte[] sector = inputFormat.ReadSector(i);
|
2015-04-19 01:07:12 +01:00
|
|
|
|
if (options.DoAdler32)
|
|
|
|
|
|
adler32ctx.Update(sector);
|
2015-04-19 01:10:32 +01:00
|
|
|
|
if (options.DoCRC16)
|
|
|
|
|
|
crc16ctx.Update(sector);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoCRC32)
|
|
|
|
|
|
crc32ctx.Update(sector);
|
|
|
|
|
|
if (options.DoCRC64)
|
|
|
|
|
|
crc64ctx.Update(sector);
|
2015-04-19 01:18:36 +01:00
|
|
|
|
if (options.DoFletcher16)
|
|
|
|
|
|
crc64ctx.Update(sector);
|
|
|
|
|
|
if (options.DoFletcher32)
|
|
|
|
|
|
crc64ctx.Update(sector);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoMD5)
|
|
|
|
|
|
md5ctx.Update(sector);
|
|
|
|
|
|
if (options.DoRIPEMD160)
|
|
|
|
|
|
ripemd160ctx.Update(sector);
|
|
|
|
|
|
if (options.DoSHA1)
|
|
|
|
|
|
sha1ctx.Update(sector);
|
|
|
|
|
|
if (options.DoSHA256)
|
|
|
|
|
|
sha256ctx.Update(sector);
|
|
|
|
|
|
if (options.DoSHA384)
|
|
|
|
|
|
sha384ctx.Update(sector);
|
|
|
|
|
|
if (options.DoSHA512)
|
|
|
|
|
|
sha512ctx.Update(sector);
|
2015-04-19 01:27:17 +01:00
|
|
|
|
if (options.DoSpamSum)
|
|
|
|
|
|
ssctx.Update(sector);
|
2014-07-03 18:35:19 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine();
|
2014-07-03 18:35:19 +01:00
|
|
|
|
|
2015-04-19 01:07:12 +01:00
|
|
|
|
if (options.DoAdler32)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's Adler-32: 0x{0}", adler32ctx.End());
|
2015-04-19 01:10:32 +01:00
|
|
|
|
if (options.DoCRC16)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's CRC16: 0x{0}", crc16ctx.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoCRC32)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's CRC32: 0x{0}", crc32ctx.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoCRC64)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's CRC64 (ECMA): 0x{0}", crc64ctx.End());
|
2015-04-19 01:18:36 +01:00
|
|
|
|
if (options.DoFletcher16)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's Fletcher-16: 0x{0}", fletcher16ctx.End());
|
2015-04-19 01:18:36 +01:00
|
|
|
|
if (options.DoFletcher32)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's Fletcher-32: 0x{0}", fletcher32ctx.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoMD5)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's MD5: {0}", md5ctx.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoRIPEMD160)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's RIPEMD160: {0}", ripemd160ctx.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoSHA1)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's SHA1: {0}", sha1ctx.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoSHA256)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's SHA256: {0}", sha256ctx.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoSHA384)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's SHA384: {0}", sha384ctx.End());
|
2014-07-03 18:35:19 +01:00
|
|
|
|
if (options.DoSHA512)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's SHA512: {0}", sha512ctx.End());
|
2015-04-19 01:27:17 +01:00
|
|
|
|
if (options.DoSpamSum)
|
2015-10-18 22:04:03 +01:00
|
|
|
|
DicConsole.WriteLine("Disk's SpamSum: {0}", ssctx.End());
|
2014-06-16 01:45:04 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|