We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5421da8 commit 9073e49Copy full SHA for 9073e49
HashifyNet/Algorithms/Adler32/Adler32_Implementation.cs
@@ -126,15 +126,9 @@ protected override IHashValue FinalizeHashValueInternal(CancellationToken cancel
126
// Combine s2 and s1 into the final 32-bit checksum
127
uint finalValue = (_s2 << 16) | _s1;
128
129
- // Convert to a big-endian byte array
130
- var hashValueBytes = new byte[4];
131
- hashValueBytes[0] = (byte)(finalValue >> 24);
132
- hashValueBytes[1] = (byte)(finalValue >> 16);
133
- hashValueBytes[2] = (byte)(finalValue >> 8);
134
- hashValueBytes[3] = (byte)finalValue;
135
-
136
- return new HashValue(hashValueBytes, 32);
+ return new HashValue(Endianness.GetBytesBigEndian(finalValue), 32);
137
}
138
139
140
-}
+
+}
0 commit comments