求助VB加密程序问题
各位先生好!如下内嵌加密程序,执行过程中总出现在dataX2 停止,提示为“编译错误,变量为定义“!请诸位高人帮忙看看,并有可能帮忙修改一下,谢谢!
Private Sub Form_Load()
Dim retVal, outdata, y1, y2 '加密钥匙代码
.
.
.
Randomize '加密钥匙代码
retVal = Int((2094967295 * Rnd) + 1)
outdata = retVal
y1 = Hex(shieldpc(outdata))
y2 = Hex(Lock32_Function(outdata) And &H7FFFFFFF)
If y1 = y2 Then
Else
ExitProcess (0)
End If
End Sub
Function shieldpc(outdata)
Dim key1, key2, key3, key4 '加密钥匙代码
Dim y1, y2, y22, y11
key1 = 2219 '该密码钥匙
key2 = 3351
key3 = 23381
key4 = 40189
dataX2 = outdata And &HFFFF0000
For Count1 = 0 To 3
dataX2 = dataX2 / 16
Next Count1
dataX2 = &H1FFFF And dataX2
If dataX2 > 65535 Then
dataX2 = dataX2 - 65536
End If
dataX1 = &H1FFFF And outdata
If dataX1 > 65535 Then
dataX1 = dataX1 - 65536
End If
step1 = dataX1 Xor key2
step2 = dataX2 Xor key1
step3 = step1 + step2
If step3 > 65535 Then
step3 = step3 - 65536
End If
step4 = step3 * 16 '<< 4
While step4 > 65535
step4 = step4 - 65536
Wend
step5 = step4 Mod key4
step6 = step5 * key3
While step6 > 2147483647
step6 = step6 - 2147483647 - 1
Wend
While step6 < -2147483647
step6 = step6 + 2147483647 + 1
Wend
step7 = dataX1 + key1
If step7 > 65535 Then
step7 = step7 - 65536
End If
step8 = step7 Mod key3
step9 = key4 Xor dataX2
step10 = step8 * step9
While step10 > 2147483647
step10 = step10 - 2147483647 - 1
Wend
While step10 < -2147483647
step10 = step10 + 2147483647 + 1
Wend
step11 = step10 Xor step6
shieldpc = step11
End Function