Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/nes-containers.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Crc32.cs')
-rw-r--r--Crc32.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/Crc32.cs b/Crc32.cs
index 33acf83..062da30 100644
--- a/Crc32.cs
+++ b/Crc32.cs
@@ -1,4 +1,5 @@
using System;
+using System.Linq;
using System.Security.Cryptography;
namespace com.clusterrr.Famicom.Containers
@@ -52,13 +53,9 @@ namespace com.clusterrr.Famicom.Containers
}
}
- protected override byte[] HashFinal()
- {
- return BitConverter.GetBytes(~crc);
- }
-
+ protected override byte[] HashFinal() => BitConverter.GetBytes(~crc).Reverse().ToArray();
public override bool CanTransformMultipleBlocks => true;
- public override byte[] Hash => BitConverter.GetBytes(~crc);
+ public override byte[] Hash => BitConverter.GetBytes(~crc).Reverse().ToArray();
public override int HashSize => 32;
}