diff --git a/CRC64Context.cs b/CRC64Context.cs index 0dc8732..6d0fc46 100644 --- a/CRC64Context.cs +++ b/CRC64Context.cs @@ -119,10 +119,12 @@ namespace Aaru.Checksums /// Returns a hexadecimal representation of the hash value. public string End() { + ulong crc = _hashInt ^ _finalSeed; + var crc64Output = new StringBuilder(); - for(int i = 0; i < BigEndianBitConverter.GetBytes(_hashInt ^= _finalSeed).Length; i++) - crc64Output.Append(BigEndianBitConverter.GetBytes(_hashInt ^= _finalSeed)[i].ToString("x2")); + for(int i = 0; i < BigEndianBitConverter.GetBytes(crc).Length; i++) + crc64Output.Append(BigEndianBitConverter.GetBytes(crc)[i].ToString("x2")); return crc64Output.ToString(); }