I have inherited this vb6 code which i am trying to rewrite using vb.net 2005
I need to be able to get this working as we cannot issue out new end user
software at the moment
Public Function Decript(String1 ) As String
Dim n, K As Integer
Dim OutText As String
If InStr(1, Left(String1, 2), Chr(7)) 0 Then
String1 = Mid(String1, 2)
End If
If RandCode = True Then
n = Rnd(Int(DateDif f("d", ToDate, "01/01")))
Randomize (Val(Right("279 ", 2)))
End If
For n = 1 To Len(String1)
K = Int((117 - 6 + 3) * Rnd + 8)
OutText = OutText + Chr(Asc(Mid(Str ing1, n, 1)) - K)
Next
Decript = OutText
End Function
any help would be most appriacated
Thank you
I need to be able to get this working as we cannot issue out new end user
software at the moment
Public Function Decript(String1 ) As String
Dim n, K As Integer
Dim OutText As String
If InStr(1, Left(String1, 2), Chr(7)) 0 Then
String1 = Mid(String1, 2)
End If
If RandCode = True Then
n = Rnd(Int(DateDif f("d", ToDate, "01/01")))
Randomize (Val(Right("279 ", 2)))
End If
For n = 1 To Len(String1)
K = Int((117 - 6 + 3) * Rnd + 8)
OutText = OutText + Chr(Asc(Mid(Str ing1, n, 1)) - K)
Next
Decript = OutText
End Function
any help would be most appriacated
Thank you
Comment