VB雷池编码

| |
[不指定 2013/12/22 15:51 | by admin ]
‘以下载入函数 QQ:3925993
‘转载注明出处,红防安全网 http://blog.hkfx.net

Private Sub Label1_Click()
Dim str As String
   str = Text1.Text
   Call encrypt(str)
   Text2.Text = encrypt(str)
End Sub

Private Sub Label2_Click()
Dim str1 As String
     str1 = Text3.Text
     Call decrypt(str1)
     Text4.Text = decrypt(str1)
End Sub

'加密函数
Public Function encrypt(ecode)
     Dim texts
     Dim i
     For i = 1 To Len(ecode)
     texts = texts & Chr(Asc(Mid(ecode, i, 2)) + i)
     Next
     encrypt = texts
End Function
'解密函数
Public Function decrypt(dcode)
     Dim texts
     Dim i
     For i = 1 To Len(dcode)
     texts = texts & Chr(Asc(Mid(dcode, i, 2)) - i)
     Next
     decrypt = texts
End Function
程序源码 | 评论(0) | 引用(0) | 阅读(3337)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]