用VB编的
Option Explicit
'加密
Private Sub Command1_Click()
Text2 = ""
Dim i As Long
For i = 1 To Len(Text1)
Text2 = Text2 & Chr(Asc(Mid(Text1, i, 1)) - 300)
Next
Text1 = ""
End Sub
'解密
Private Sub Command2_Click()
Text1 = ""
Dim i As Long
For i = 1 To Len(Text2)
Text1 = Text1 & Chr(Asc(Mid(Text2, i, 1)) + 300)
Next
End Sub
'原字符串
Private Sub Form_Load()
Text1 = "中华人民共和国"
Text2 = ""
End Sub