用vb 如何 把 字符串 JS加密
发布网友
发布时间:2022-05-06 06:56
我来回答
共3个回答
热心网友
时间:2022-06-29 16:15
Private Sub Form_Load()
FileName$ = InputBox("请输入需要加密的文件名及路径:")
Open FileName$ For Input As #1
Line Input #1, yw$
Close #1
xw$ = ""
n = Len(yw$)
For i = 1 To n
yz$ = Mid$(yw$, i, 1)
xz$ = Chr(Asc(yz$) - 10)
xw$ = xw$ & xz$
Next
Open FileName$ For Output As #1
Print #1, xw$
Close #1
MsgBox "####加密已完成!!####"
End
End Sub
热心网友
时间:2022-06-29 16:15
//j简单的异或加密解密,第一次调用加密,第二次调用解密
Function EnStr(srcStr As String, Keys As Byte) As String
Dim tmp() As Byte
tmp = StrConv(srcStr, vbFromUnicode)
Dim i As Long
For i = 0 To UBound(tmp)
tmp(i) = tmp(i) Xor Keys
Next
EnStr = StrConv(tmp, vbUnicode)
End Function
热心网友
时间:2022-06-29 16:16
把 visale 属性用#或*代替就是了