找传奇、传世资源到传世资源站!

vb 加密解密字符串的例子

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

from clipboard'Download by http://www.NewXing.comPublic Function Crypt(texti, salasana) As String On Error Resume Next For T = 1 To Len(salasana) sana = Asc(Mid(salasana, T, 1)) X1 = X1 sana Next X1 = Int((X1 * 0.1) / 6) salasana = X1 G = 0 For TT = 1 To Len(texti) sana = Asc(Mid(texti, TT, 1)) G = G 1 If G = 6 Then G = 0 X1 = 0 If G = 0 Then X1 = sana - (salasana - 2) If G = 1 Then X1 = sana (salasana - 5) If G = 2 Then X1 = sana - (salasana - 4) If G = 3 Then X1 = sana (salasana - 2) If G = 4 Then X1 = sana - (salasana - 3) If G = 5 Then X1 = sana (salasana - 5)X1 = X1 GCrypted = Crypted & Chr(X1) Next Crypt = Crypted End FunctionPublic Function DeCrypt(texti, salasana) As String On Error Resume Next For T = 1 To Len(salasana) sana = Asc(Mid(salasana, T, 1)) X1 = X1 sana Next X1 = Int((X1 * 0.1) / 6) salasana = X1 G = 0 For TT = 1 To Len(texti) sana = Asc(Mid(texti, TT, 1)) G = G 1 If G = 6 Then G = 0 X1 = 0 If G = 0 Then X1 = sana (salasana - 2) If G = 1 Then X1 = sana - (salasana - 5) If G = 2 Then X1 = sana (salasana - 4) If G = 3 Then X1 = sana - (salasana - 2) If G = 4 Then X1 = sana (salasana - 3) If G = 5 Then X1 = sana - (salasana - 5)X1 = X1 - GDeCrypted = DeCrypted & Chr(X1) Next DeCrypt = DeCrypted End Function

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复