本人用VB做了一个小型的加密程序,有意者可试用,给点建议!
此程序很简单,但却很实用!能完成对文本的加密与解密!具体见程序说明!无毒,放心!
Private Sub Command1_Click() Dim n As Integer '加密 Dim i As Integer Dim t As Integer n = Len(Text1.Text) For i = 1 To n c = Mid(Text1.Text, i, 1) t = Asc(c) + 1 Text2.Text = Text2.Text + Chr(t) Next i End Sub Private Sub Command2_Click() Dim n As Integer '解密 Dim i As Integer Dim t As Integer n = Len(Text1.Text) For i = 1 To n c = Mid(Text1.Text, i, 1) t = Asc(c) - 1 Text2.Text = Text2.Text + Chr(t) Next i End Sub Private Sub Command3_Click() Text1.Text = "" '清空 Text2.Text = "" End Sub原理其实很简单,望多提意见!