當前位置:成語大全網 - 新華字典 - 用vb 如何 把 字符串 JS加密

用vb 如何 把 字符串 JS加密

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