Fix unused code.

This commit is contained in:
2020-07-20 07:47:11 +01:00
parent c6f338a35f
commit ea50972175
2 changed files with 4 additions and 8 deletions

View File

@@ -39,10 +39,8 @@ namespace Aaru.Checksums
/// <summary>Implements a CRC32 algorithm</summary> /// <summary>Implements a CRC32 algorithm</summary>
public class Crc32Context : IChecksum public class Crc32Context : IChecksum
{ {
const uint CRC32_ISO_POLY = 0xEDB88320; const uint CRC32_ISO_POLY = 0xEDB88320;
const uint CRC32_ISO_SEED = 0xFFFFFFFF; const uint CRC32_ISO_SEED = 0xFFFFFFFF;
const uint CRC32_CASTAGNOLI_POLY = 0x8F6E37A0;
const uint CRC32_CASTAGNOLI_SEED = 0xFFFFFFFF;
readonly uint finalSeed; readonly uint finalSeed;
readonly uint[] table; readonly uint[] table;

View File

@@ -266,7 +266,7 @@ namespace Aaru.Checksums
// CLAUNIA: Flags seems to never be used in ssdeep, so I just removed it for code simplicity // CLAUNIA: Flags seems to never be used in ssdeep, so I just removed it for code simplicity
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
uint FuzzyDigest(out byte[] result) void FuzzyDigest(out byte[] result)
{ {
var sb = new StringBuilder(); var sb = new StringBuilder();
uint bi = self.Bhstart; uint bi = self.Bhstart;
@@ -315,7 +315,7 @@ namespace Aaru.Checksums
Array.Copy(Encoding.ASCII.GetBytes(sb.ToString()), 0, result, 0, i); Array.Copy(Encoding.ASCII.GetBytes(sb.ToString()), 0, result, 0, i);
resultOff += i; resultOff = i;
i = (int)self.Bh[bi].Dlen; i = (int)self.Bh[bi].Dlen;
@@ -431,8 +431,6 @@ namespace Aaru.Checksums
} }
result[resultOff] = 0; result[resultOff] = 0;
return 0;
} }
/// <summary>Gets the hash of a file</summary> /// <summary>Gets the hash of a file</summary>