📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4245
ClientLeft = 60
ClientTop = 450
ClientWidth = 6045
LinkTopic = "Form1"
ScaleHeight = 4245
ScaleWidth = 6045
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command5
Caption = "Command5"
Height = 375
Left = 2640
TabIndex = 7
Top = 840
Width = 2055
End
Begin VB.CommandButton Command4
Caption = "Command4"
Height = 495
Left = 2640
TabIndex = 6
Top = 120
Width = 2175
End
Begin VB.CommandButton Command3
Caption = "Command3"
Height = 540
Left = 120
TabIndex = 5
Top = 360
Width = 2295
End
Begin VB.TextBox Text1
Height = 495
Left = 360
TabIndex = 4
Text = "Text1"
Top = 1920
Width = 2775
End
Begin VB.TextBox Text2
Height = 375
Left = 360
TabIndex = 3
Text = "Text2"
Top = 2640
Width = 2775
End
Begin VB.TextBox Text3
Height = 375
IMEMode = 3 'DISABLE
Left = 360
TabIndex = 2
Text = "Text3"
Top = 3360
Width = 2775
End
Begin VB.CommandButton Command1
Caption = "加密"
Height = 495
Left = 3960
TabIndex = 1
Top = 1680
Width = 975
End
Begin VB.CommandButton Command2
Caption = "解密"
Height = 495
Left = 3960
TabIndex = 0
Top = 2400
Width = 975
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim des As New clsDES
Dim B() As Byte
Dim ByteArray() As Byte
Private Sub Command1_Click()
'Convert the text into a byte array
'ByteArray() = StrConv(Text1.Text, vbFromUnicode)
des.Key = ""
Text2.Text = des.EncryptString(Text1.Text, "12345678")
'Call des.EncryptByte(ByteArray(), Text1.Text)
End Sub
Private Sub Command2_Click()
Text3.Text = des.DecryptString(Text2.Text, "12345678")
'Text3.Text = des.DecryptByte(ByteArray, Text1.Text)
'Text2.Text = des.EncryptString(Text1.Text, "12345678")
End Sub
Private Sub Command3_Click()
Dim ByteArray() As Byte
Dim ByteArray1() As Byte
'Convert the text into a byte array
ByteArray1() = StrConv(Text1.Text, vbFromUnicode)
Call C.DES_Decode(ByteArray1(), "12345678", ByteArray())
Text2.Text = StrConv(ByteArray(), vbUnicode)
End Sub
Private Sub Command4_Click()
Dim ByteArray() As Byte
Dim ByteArray1() As Byte
'Convert the text into a byte array
ByteArray1() = StrConv(Text2.Text, vbFromUnicode)
Call C.DES_Encode(ByteArray1(), "12345678", ByteArray())
Text3.Text = StrConv(ByteArray(), vbUnicode)
End Sub
Private Sub Command5_Click()
Dim ByteArray1() As Byte
'Convert the text into a byte array
'ByteArray1() = StrConv(Text2.Text, vbFromUnicode)
Call C.DES_Encode(ByteArray(), "12345678", ByteArray1())
Text3.Text = StrConv(ByteArray1(), vbUnicode)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -