I see. Thanks HDX
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu Public Sub DecodeSCKey(ByVal CDKey As String, ByRef Product As Long, ByRef PublicValue As Long, ByRef PrivateValue As Long)
Dim tKey(12) As String, tStr As String, tLng As Long, hashKey As Long, pos As Integer, i As Integer
'Fill array
For i = 0 To 12
tKey(i) = Mid$(CDKey, i + 1, 1)
Next i
'Verify Key
tLng = 3
For i = 0 To 11
tLng = tLng + (tKey(i) Xor (tLng * 2))
Next i
If tKey(12) = (tLng Mod 10) Then
'Shuffling
pos = &HB
For i = &HC2 To 7 Step -&H11
tStr = tKey(pos)
tLng = i Mod &HC
tKey(pos) = tKey(tLng)
tKey(tLng) = tStr
pos = pos - 1
Next i
'Final Values
hashKey = &H13AC9741
For i = 11 To 0 Step -1
tStr = tKey(i)
If Asc(tStr) <= 55 Then
tKey(i) = (((hashKey And &HFF) And 7) Xor tStr)
hashKey = hashKey \ 8
ElseIf Asc(tStr) < 65 Then
tKey(i) = ((i And 1) Xor tStr)
End If
Next i
tStr = Join(tKey, vbNullString)
Product = CLng("&H" & Left$(tStr, 2))
PublicValue = CLng(Mid$(tStr, 3, 7))
PrivateValue = CLng(Mid$(tStr, 10))
End If
End Sub
Page created in 0.043 seconds with 16 queries.