In C#, I'm struggling to generate/compute CRC32. Currently I'm using this method: (Crc32 class is imported from this source)
Crc32 c = new Crc32();
var hash = string.Empty;
foreach(byte b in c.ComputeHash(package))
{
hash += b.ToString("0x").ToLower();
}
Then:
Console.WriteLine(hash);
And the result is: 0048284b
But i want to get it in HEX form. Like "0xD754C033" so i can put it inside an byte array. Did some digging for CRC32 computation for byte array but couldn't find anything viable.
Long story short: How can i compute CRC32 hex of a byte array ? (properly)
P.S: Not duplicate according to link provided, posted answer.