📄 frmencrypt.frm
字号:
VERSION 5.00
Begin VB.Form frmEncrypt
Caption = "一个德国的enigma加密技术例子 "
ClientHeight = 5745
ClientLeft = 60
ClientTop = 375
ClientWidth = 6075
Icon = "frmEncrypt.frx":0000
LinkTopic = "Form1"
ScaleHeight = 5745
ScaleWidth = 6075
StartUpPosition = 2 '屏幕中心
Begin VB.CheckBox Check1
Caption = "支持汉字(一个汉字占四个BYTE)"
Height = 495
Left = 1800
TabIndex = 6
Top = 120
Width = 3735
End
Begin VB.TextBox tpasswd
Height = 375
Left = 480
TabIndex = 4
Top = 2520
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "加密"
Height = 510
Left = 600
TabIndex = 1
Top = 3240
Width = 1410
End
Begin VB.TextBox Text1
Height = 1245
Left = 480
MultiLine = -1 'True
TabIndex = 0
ToolTipText = "请输入要加密的信息."
Top = 720
Width = 3600
End
Begin VB.PictureBox ImageList1
BackColor = &H80000005&
Height = 480
Left = 5445
ScaleHeight = 420
ScaleWidth = 1140
TabIndex = 2
Top = 5760
Width = 1200
End
Begin VB.Label Label2
Caption = "输入密码"
Height = 255
Left = 600
TabIndex = 5
Top = 2160
Width = 975
End
Begin VB.Label Label1
Caption = "输入信息"
Height = 375
Left = 600
TabIndex = 3
Top = 120
Width = 855
End
End
Attribute VB_Name = "frmEncrypt"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private MydsEncrypt As dsEncrypt
Dim ctools As chartools
Dim info As String
Private Sub Command1_Click()
If MydsEncrypt Is Nothing Then
Set MydsEncrypt = New dsEncrypt
Set ctools = New chartools
End If
info = Text1.Text
MydsEncrypt.KeyString = tpasswd.Text
If Command1.Caption = "加密" Then
Command1.Caption = "解密"
Else
Command1.Caption = "加密"
End If
If Check1.Value = 1 Then
If Command1.Caption = "解密" Then
info = ctools.string2hexstring(Text1.Text)
MsgBox info
Text1.Text = MydsEncrypt.Encrypt(info)
Else
info = MydsEncrypt.Encrypt(info)
Text1.Text = ctools.hexstring2string(info)
End If
Else
Text1.Text = MydsEncrypt.Encrypt(info)
End If
End Sub
Private Sub Form_Load()
'‘MydsEncrypt.KeyString = ("KATHER")
Command1.Caption = "加密"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -