📄 frmcrypttest.frm
字号:
VERSION 5.00
Begin VB.Form FrmCryptTest
BorderStyle = 1 'Fixed Single
Caption = "Crypting VB Test"
ClientHeight = 2850
ClientLeft = 45
ClientTop = 330
ClientWidth = 4485
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2850
ScaleWidth = 4485
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command3
Caption = "Exit"
Height = 330
Left = 2992
TabIndex = 10
Top = 2205
Width = 1305
End
Begin VB.CommandButton Command2
Caption = "Bad Decrypt"
Height = 330
Left = 1597
TabIndex = 9
Top = 2205
Width = 1305
End
Begin VB.TextBox Text4
Height = 285
Left = 1380
TabIndex = 7
Text = "Text1"
Top = 1620
Width = 2415
End
Begin VB.CommandButton Command1
Caption = "Do Crypting"
Height = 330
Left = 187
TabIndex = 6
Top = 2205
Width = 1305
End
Begin VB.TextBox Text3
Height = 285
Left = 1380
TabIndex = 4
Text = "Text1"
Top = 1245
Width = 2415
End
Begin VB.TextBox Text2
Height = 285
Left = 1380
TabIndex = 2
Text = "Text1"
Top = 870
Width = 2415
End
Begin VB.TextBox Text1
Height = 285
Left = 1380
TabIndex = 0
Text = "Text1"
Top = 495
Width = 2415
End
Begin VB.Label Label4
Alignment = 1 'Right Justify
Caption = "Decrypted String:"
Height = 225
Left = 60
TabIndex = 8
Top = 1665
Width = 1260
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
Caption = "Encrypted String:"
Height = 225
Left = 60
TabIndex = 5
Top = 1290
Width = 1275
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
Caption = "String to Crypt:"
Height = 225
Left = 60
TabIndex = 3
Top = 900
Width = 1185
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "Pass Phrase:"
Height = 225
Left = 225
TabIndex = 1
Top = 525
Width = 1020
End
End
Attribute VB_Name = "FrmCryptTest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
' MUST be registered
Dim CryptTest As CRYPTITLib.Cryptor
Private Sub Command1_Click()
Set CryptTest = New CRYPTITLib.Cryptor
CryptTest.PassPhrase = Text1.Text
CryptTest.StringToCrypt = Text2.Text
CryptTest.DoCrypting
' Normally I would not store to a string
' variable, update the text control, then
' use the variable to set the property (below)
' but WinNT 4.0 (SP3)/VB 6.0 (SP3) environment I get
' the wrong decryption...go figure? Try it:
'
' Text3.Text = CryptTest.ReturnCrypted
'
' CryptTest.StringToCrypt = Text3.Text
'
' The above does work on Win2000/VB 6.0 (SP3)!!!
'
' again, "go figure!"
'
Dim strTest As String
strTest = CryptTest.ReturnCrypted
Text3.Text = strTest
CryptTest.StringToCrypt = strTest
CryptTest.DoCrypting
Text4.Text = CryptTest.ReturnCrypted
Set CryptTest = Nothing
End Sub
Private Sub Command2_Click()
Set CryptTest = New CRYPTITLib.Cryptor
CryptTest.PassPhrase = Text1.Text
CryptTest.StringToCrypt = Text2.Text
CryptTest.DoCrypting
' Normally I would not store to a string
' variable, update the text control, then
' use the variable to set the property (below)
' but WinNT 4.0 (SP3)/VB 6.0 (SP3) environment I get
' the wrong decryption...go figure? Try it:
'
' Text3.Text = CryptTest.ReturnCrypted
'
' CryptTest.StringToCrypt = Text3.Text
'
' The above does work on Win2000/VB 6.0 (SP3)!!!
'
' again, "go figure!"
'
Dim strTest As String
strTest = CryptTest.ReturnCrypted
Text3.Text = strTest
' Change the Pass Phrase so the encryptions
' do NOT match...this will make a bad Decrypt
CryptTest.PassPhrase = "Test!"
CryptTest.StringToCrypt = strTest
CryptTest.DoCrypting
Text4.Text = CryptTest.ReturnCrypted
Set CryptTest = Nothing
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -