Private Sub Comman1_Click() Dim str1, str2, str3 As String str1 = "王宇虹" str2 = Encrypt(str1, 188, 24) MsgBox str2 str3 = Encrypt(str2, 188, 24) MsgBox str3 End Sub
'从待加(解)密字符串中取出一个字符 strChar = Mid(strSource, i, 1) ' 取字符的低字节和Key1进行异或运算 bLowData = AscB(MidB(strChar, 1, 1)) Xor Key1 '取字符的高字节和K2进行异或运算 bHigData = AscB(MidB(strChar, 2, 1)) Xor Key2 '将运算后的数据合成新的字符 strEncrypt = strEncrypt & ChrB(bLowData) & ChrB(bHigData) Next |
|站长邮箱|小黑屋|手机版|Office中国/Access中国
( 粤ICP备10043721号-1 )
GMT+8, 2025-4-4 19:38 , Processed in 0.311589 second(s), 16 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.