In my applicattion, I used an encrpted string based on a number of features
of the user machine and my program. I created an encryption program to
create the encrypted string, and within the user program is the same
encryption function to check that the two strings are equal. The function I
used is below:-
Imports System.Text
Imports System.Security.Cryptography
Module modEncrypt
Public Function HashData(ByVal s As String) As String
'Convert the string to a byte array
Dim bytDataToHash As Byte() = _
(New UnicodeEncoding()).GetBytes(s)
'Compute the MD5 hash algorithm
Dim bytHashValue As Byte() = _
New MD5CryptoServiceProvider().ComputeHash(bytDataToHa sh)
Return BitConverter.ToString(bytHashValue)
End Function
End Module
Best wishes
Paul Bromley
'Arne Beruldsen' <Ar***********@discussions.microsoft.comwrote in message
news:55**********************************@microsof t.com..
>I have a windows app using vb.net 2005.
I would like to create a serial number based on a couple of
characteristics
of the customers computer (computer name, HD number.etc). I don't need
anything complicated just a way to generate a 16 character number.
Is there an easy way to do this..?
Thanks