Calculate CRC32 of an String or Byte Array [duplicate]
This question already has an answer here: How do I calculate CRC32 of a string 2 answers Is there any function or example for VB.NET to calculate CRC32 of an string or Byte Array? Use this: Private Sub Main() Crc32.ComputeChecksum(Encoding.UTF8.GetBytes("Some string")).Dump() End Sub Public Class Crc32 Shared table As UInteger() Shared Sub New() Dim poly As UInteger = &Hedb88320UI table = New UInteger(255) {} Dim temp As UInteger = 0 For i As UInteger = 0 To table.Length - 1 temp = i For j As Integer = 8 To 1 Step -1 If (temp And 1) = 1 Then temp = CUInt((temp >> 1) Xor poly) Else temp >>= 1