CRC

  • Thread starter Thread starter Tomasz Szczepa?ski
  • Start date Start date
T

Tomasz Szczepa?ski

Hello,
I have to generate CRC , can someone show me how it can be done ??

Regards
Paul
 
Hello,
Thenx fo example

i have write it in vb
but it stil is diferent from CRC32
Is posible to convert hash to CRC32 ??

Regards
Paul
---------------Code

Function crc(ByVal file_name As String) As String
Dim file As System.IO.FileStream
Dim Sha1T As SHA1CryptoServiceProvider
Dim HASH
Dim BUFF As New StringBuilder
Dim hashByte As Byte
file = New FileStream(file_name, FileMode.Open, FileAccess.Read,
FileShare.Read, 8192)
Sha1T = New SHA1CryptoServiceProvider()

Sha1T.ComputeHash(file)
HASH = Sha1T.Hash
For Each hashByte In HASH
BUFF.Append(String.Format("{0:X1}", hashByte))
Next
Return BUFF.ToString()
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top