diff --git a/CRC32Context.cs b/CRC32Context.cs index afdb918..b7531a6 100644 --- a/CRC32Context.cs +++ b/CRC32Context.cs @@ -39,10 +39,8 @@ namespace Aaru.Checksums /// Implements a CRC32 algorithm public class Crc32Context : IChecksum { - const uint CRC32_ISO_POLY = 0xEDB88320; - const uint CRC32_ISO_SEED = 0xFFFFFFFF; - const uint CRC32_CASTAGNOLI_POLY = 0x8F6E37A0; - const uint CRC32_CASTAGNOLI_SEED = 0xFFFFFFFF; + const uint CRC32_ISO_POLY = 0xEDB88320; + const uint CRC32_ISO_SEED = 0xFFFFFFFF; readonly uint finalSeed; readonly uint[] table; diff --git a/SpamSumContext.cs b/SpamSumContext.cs index 7f409e9..01b88ce 100644 --- a/SpamSumContext.cs +++ b/SpamSumContext.cs @@ -266,7 +266,7 @@ namespace Aaru.Checksums // CLAUNIA: Flags seems to never be used in ssdeep, so I just removed it for code simplicity [MethodImpl(MethodImplOptions.AggressiveInlining)] - uint FuzzyDigest(out byte[] result) + void FuzzyDigest(out byte[] result) { var sb = new StringBuilder(); uint bi = self.Bhstart; @@ -315,7 +315,7 @@ namespace Aaru.Checksums Array.Copy(Encoding.ASCII.GetBytes(sb.ToString()), 0, result, 0, i); - resultOff += i; + resultOff = i; i = (int)self.Bh[bi].Dlen; @@ -431,8 +431,6 @@ namespace Aaru.Checksums } result[resultOff] = 0; - - return 0; } /// Gets the hash of a file