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

📄 encryptform.frm

📁 MD5加解密源码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form PaveHash 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "PaveHash"
   ClientHeight    =   2610
   ClientLeft      =   3570
   ClientTop       =   2970
   ClientWidth     =   4455
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2610
   ScaleWidth      =   4455
   Begin VB.CommandButton btnExit 
      Caption         =   "Exit"
      Height          =   255
      Left            =   1680
      TabIndex        =   6
      Top             =   2280
      Width           =   1095
   End
   Begin VB.CommandButton btnSave 
      Caption         =   "Save Hash To File"
      Height          =   255
      Left            =   1200
      TabIndex        =   5
      Top             =   1560
      Width           =   2055
   End
   Begin VB.CommandButton btnAbout 
      Caption         =   "About"
      Height          =   255
      Left            =   1680
      TabIndex        =   4
      Top             =   1920
      Width           =   1095
   End
   Begin VB.TextBox txtHash 
      Height          =   285
      Left            =   120
      TabIndex        =   3
      Top             =   1200
      Width           =   4215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Generate  Hash"
      Height          =   255
      Left            =   1320
      TabIndex        =   2
      Top             =   840
      Width           =   1815
   End
   Begin VB.TextBox txtPass 
      Height          =   285
      Left            =   1320
      TabIndex        =   1
      Top             =   480
      Width           =   1815
   End
   Begin VB.Label Label1 
      Caption         =   "Enter Text Here :"
      Height          =   255
      Left            =   1560
      TabIndex        =   0
      Top             =   120
      Width           =   1335
   End
End
Attribute VB_Name = "PaveHash"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub btnAbout_Click()
frmAbout.Show
End Sub

Private Sub btnExit_Click()
Unload Me
End Sub

Private Sub btnSave_Click()
MsgBox "Hash will be saved into the file hash.txt in the application directory", cbOKOnly, "PaveHash"
Open "hash.txt" For Output As #1
Print #1, "Password =", txtPass.Text, "Hash =", txtHash.Text
Close #1

End Sub

Private Sub Command1_Click()
'/PAVEHASH/
'/Strong HASH/
'/The source is very messy.SORRY/

Dim pass As String
Dim ssap As String
Dim pass3 As String
Dim d As String
Dim smac234 As String
Dim xi As String


pass = txtPass.Text
ssap = StrReverse(pass)

'get md5 hash
hash = CalculateMD5(pass)
hash2 = CalculateMD5(ssap)

'combine both 12 bytes of hash
pass3 = hash & hash2

'get md5 hash
hash3 = CalculateMD5(pass3)


'XOR the hash (one way XOR system (undecryptabe))
length = Len(hash3)
d = ""

For i = 1 To length
 Char$ = Mid(hash3, i, 1)
 code = i + 1
 code2 = i * code
 salt = i * 2
result = (((Asc(Char$) Xor salt) + ((code * code2) + code)) Xor code2)
logans = Fix(Cos(result)) * 137
result = result + ((length And i) Or (length Or i)) + logans
d = d & result
Next i

'get md5
smac234 = CalculateMD5(d)

'extract  24 bytes of the md5 hash

ye = Mid(smac234, 1, 12)
Yd = Mid(smac234, 13, 12)

'encrypt with low-level encryption
xi = Encrypt(d, smac234)
'get md5
xin = CalculateMD5(xi)
'get md5
preans = CalculateMD5(Yd & ye)


'combine bytes to create primary hash - 36 bytes
yf = Mid(preans, 1, 12)
Y2 = yf & "-" & Yd & "-" & ye
y3 = UCase(Y2)

'calculate secondary hash -last 4 bytes
n = 0
length = Len(y3)

For i = 1 To length
 Char$ = Mid(y3, i, 1)
 Char = Asc(Char$)
 n = n + Char
Next i

 
 t = n
 n = Mid(t, 1, 4)
 'pseudorandom number generator
 randseed = (Sin(n) * 500) Mod 255
 n = (Abs(Int(Log(n) * 1000) * randseed) Mod 10000) Mod 8999
 n = Abs(Fix(n + Sin(n)))
 n = n + 1000

txtHash.Text = y3 & "-" & n
    
txtHash.SetFocus
'align the text to middle
txtHash.Alignment = 2
PaveHash.Show


End Sub

⌨️ 快捷键说明

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