⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmhash.frm

📁 程序加密算法
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmHash 
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   5250
   ClientLeft      =   1560
   ClientTop       =   1845
   ClientWidth     =   5565
   Icon            =   "frmHash.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5250
   ScaleWidth      =   5565
   Begin VB.TextBox txtHash 
      BackColor       =   &H00FFFFC0&
      BeginProperty Font 
         Name            =   "Fixedsys"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Index           =   3
      Left            =   120
      Locked          =   -1  'True
      TabIndex        =   18
      TabStop         =   0   'False
      Top             =   4200
      Width           =   5295
   End
   Begin VB.Frame Frame1 
      Caption         =   "Hash Functions"
      Height          =   975
      Left            =   120
      TabIndex        =   12
      Top             =   840
      Width           =   2235
      Begin VB.OptionButton optHash 
         Caption         =   "SHA-1"
         Height          =   195
         Index           =   3
         Left            =   1260
         TabIndex        =   16
         Top             =   540
         Width           =   855
      End
      Begin VB.OptionButton optHash 
         Caption         =   "MD5"
         Height          =   195
         Index           =   2
         Left            =   1260
         TabIndex        =   15
         Top             =   300
         Width           =   855
      End
      Begin VB.OptionButton optHash 
         Caption         =   "MD4"
         Height          =   195
         Index           =   1
         Left            =   300
         TabIndex        =   14
         Top             =   540
         Width           =   855
      End
      Begin VB.OptionButton optHash 
         Caption         =   "MD2"
         Height          =   195
         Index           =   0
         Left            =   300
         TabIndex        =   13
         Top             =   300
         Value           =   -1  'True
         Width           =   855
      End
   End
   Begin VB.TextBox txtHash 
      BackColor       =   &H00FFFFC0&
      BeginProperty Font 
         Name            =   "Fixedsys"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Index           =   2
      Left            =   120
      Locked          =   -1  'True
      TabIndex        =   11
      TabStop         =   0   'False
      Top             =   3600
      Width           =   5295
   End
   Begin VB.TextBox txtHash 
      BackColor       =   &H00FFFFC0&
      BeginProperty Font 
         Name            =   "Fixedsys"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Index           =   1
      Left            =   120
      Locked          =   -1  'True
      TabIndex        =   10
      TabStop         =   0   'False
      Top             =   3000
      Width           =   5295
   End
   Begin VB.TextBox txtHash 
      BackColor       =   &H00FFFFC0&
      BeginProperty Font 
         Name            =   "Fixedsys"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   0
      Left            =   120
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      TabIndex        =   9
      TabStop         =   0   'False
      Top             =   2100
      Width           =   5295
   End
   Begin VB.ComboBox cboTestData 
      Height          =   315
      Left            =   2760
      TabIndex        =   0
      Text            =   "cboTestData"
      Top             =   1140
      Width           =   2655
   End
   Begin VB.CommandButton cmdChoice 
      Caption         =   "&Test"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Index           =   0
      Left            =   3360
      TabIndex        =   1
      Top             =   4680
      Width           =   975
   End
   Begin VB.CommandButton cmdChoice 
      Caption         =   "&Cancel"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Index           =   1
      Left            =   4440
      TabIndex        =   2
      Top             =   4680
      Width           =   975
   End
   Begin VB.Label lblSID 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Height          =   195
      Left            =   240
      TabIndex        =   17
      Top             =   3960
      Width           =   45
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Actual output"
      Height          =   195
      Index           =   3
      Left            =   240
      TabIndex        =   8
      Top             =   3360
      Width           =   945
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Predicted output"
      Height          =   195
      Index           =   2
      Left            =   240
      TabIndex        =   7
      Top             =   2760
      Width           =   1170
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Input test data"
      Height          =   195
      Index           =   1
      Left            =   240
      TabIndex        =   6
      Top             =   1860
      Width           =   1020
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Select your test data"
      Height          =   195
      Index           =   0
      Left            =   3180
      TabIndex        =   5
      Top             =   900
      Width           =   1455
   End
   Begin VB.Label lblMyLabel 
      BackStyle       =   0  'Transparent
      Height          =   360
      Left            =   180
      TabIndex        =   4
      Top             =   4680
      Width           =   2925
   End
   Begin VB.Label lblTitle 
      Alignment       =   2  'Center
      BackColor       =   &H00C00000&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Test Hash Algorithms"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   555
      Left            =   120
      TabIndex        =   3
      Top             =   120
      Width           =   5310
   End
End
Attribute VB_Name = "frmHash"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
  
' ===========================================================================
'    DATE      NAME                      DESCRIPTION
' -----------  ------------------------  ------------------------------------
' 30-DEC-2000  Kenneth Ives              Written by kenaso@home.com
' ---------------------------------------------------------------------------
' Module level variables
' ---------------------------------------------------------------------------
  Private m_intHashType  As Integer
  Private m_strHashType  As String

Private Sub cboTestData_Click()

' ---------------------------------------------------------------------------
' Based on item selected, update the display boxes
' ---------------------------------------------------------------------------
  Select Case m_intHashType
        Case 1  ' Use MD5
              ' use the combo box index to determine which test to perform
              Select Case cboTestData.ListIndex
                     Case 0: ' single letter "a"
                          txtHash(0).Text = "a"
                          txtHash(1).Text = "0CC175B9C0F1B6A831C399E269772661"
                    
                     Case 1: ' letters "abc"
                          txtHash(0).Text = "abc"
                          txtHash(1).Text = "900150983CD24FB0D6963F7D28E17F72"
                    
                     Case 2: ' Empty string
                          txtHash(0).Text = ""
                          txtHash(1).Text = "D41D8CD98F00B204E9800998ECF8427E"
                         
                     Case 3: ' 2 words "message digest"
                          txtHash(0).Text = "message digest"
                          txtHash(1).Text = "F96B697D7CB7938D525A2F31AAF161D0"
                    
                     Case 4: ' Multiple letters
                          txtHash(0).Text = "abcdefghijklmnopqrstuvwxyz"
                          txtHash(1).Text = "C3FCD3D76192E4007DFB496CCA67E13B"
                    
                     Case 5: ' Letters and numbers
                          txtHash(0).Text = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
                          txtHash(1).Text = "D174AB98D277D9F5A5611C2C9F419D9F"
                    
                     Case 6: ' Multiple Numbers
                          txtHash(0).Text = "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
                          txtHash(1).Text = "57EDF4A22BE3C955AC49DA2E2107B67A"
              End Select
  
        Case 2  ' Use MD4
              ' use the combo box index to determine which test to perform

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -