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

📄 mainfrm.frm

📁 比WinZip速度快很多的SINE256加密算法模块。支持指定密钥
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCHRT20.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form MainFrm 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "SINE256加密可视化以及控制示例"
   ClientHeight    =   8295
   ClientLeft      =   150
   ClientTop       =   855
   ClientWidth     =   13470
   Icon            =   "MainFrm.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   8295
   ScaleWidth      =   13470
   StartUpPosition =   3  '窗口缺省
   Begin MSChart20Lib.MSChart CryptChart 
      Height          =   3015
      Left            =   6240
      OleObjectBlob   =   "MainFrm.frx":030A
      TabIndex        =   6
      Top             =   5160
      Width           =   7335
   End
   Begin MSChart20Lib.MSChart TextChart 
      Height          =   3135
      Left            =   6240
      OleObjectBlob   =   "MainFrm.frx":2C85
      TabIndex        =   5
      Top             =   2280
      Width           =   7335
   End
   Begin MSChart20Lib.MSChart AlgoChart 
      Height          =   3135
      Left            =   6240
      OleObjectBlob   =   "MainFrm.frx":55FE
      TabIndex        =   7
      Top             =   -240
      Width           =   7335
   End
   Begin MSComDlg.CommonDialog Dlg 
      Left            =   6240
      Top             =   480
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Caption         =   "统计信息 (每步执行的所需毫秒时间)"
      Height          =   2175
      Left            =   120
      TabIndex        =   11
      Top             =   2400
      Width           =   6015
      Begin VB.Label Label7 
         Caption         =   "字符串转换字节耗时:"
         Height          =   255
         Left            =   120
         TabIndex        =   19
         Top             =   360
         Width           =   2295
      End
      Begin VB.Label Label8 
         Alignment       =   2  'Center
         Caption         =   "加密/解密耗时:"
         Height          =   255
         Left            =   360
         TabIndex        =   18
         Top             =   840
         Width           =   2055
      End
      Begin VB.Label Label9 
         Caption         =   "字节转换字符串耗时:"
         Height          =   255
         Left            =   120
         TabIndex        =   17
         Top             =   1320
         Width           =   2295
      End
      Begin VB.Label Label10 
         Caption         =   "显示数据:"
         Height          =   255
         Left            =   1200
         TabIndex        =   16
         Top             =   1800
         Width           =   1335
      End
      Begin VB.Label StatsLbl 
         BackStyle       =   0  'Transparent
         Height          =   255
         Index           =   0
         Left            =   2520
         TabIndex        =   15
         Top             =   360
         Width           =   3495
      End
      Begin VB.Label StatsLbl 
         BackStyle       =   0  'Transparent
         Height          =   255
         Index           =   1
         Left            =   2520
         TabIndex        =   14
         Top             =   840
         Width           =   3495
      End
      Begin VB.Label StatsLbl 
         BackStyle       =   0  'Transparent
         Height          =   255
         Index           =   2
         Left            =   2520
         TabIndex        =   13
         Top             =   1320
         Width           =   3495
      End
      Begin VB.Label StatsLbl 
         BackStyle       =   0  'Transparent
         Height          =   255
         Index           =   3
         Left            =   2520
         TabIndex        =   12
         Top             =   1800
         Width           =   3495
      End
   End
   Begin VB.CommandButton DecryptFile 
      Caption         =   "解密文件"
      Height          =   330
      Left            =   4560
      TabIndex        =   10
      Top             =   1950
      Width           =   1575
   End
   Begin VB.CommandButton EncryptFile 
      Caption         =   "加密文件"
      Height          =   330
      Left            =   2880
      TabIndex        =   9
      Top             =   1950
      Width           =   1575
   End
   Begin VB.CommandButton SwapCmd 
      Caption         =   "发送到加密文本框"
      Height          =   345
      Left            =   240
      TabIndex        =   8
      Top             =   7365
      Width           =   2295
   End
   Begin VB.CommandButton Decrypt 
      Caption         =   "解密"
      Height          =   330
      Left            =   1440
      TabIndex        =   4
      Top             =   1950
      Width           =   1335
   End
   Begin RichTextLib.RichTextBox t2 
      Height          =   2175
      Left            =   120
      TabIndex        =   2
      Top             =   4920
      Width           =   6015
      _ExtentX        =   10610
      _ExtentY        =   3836
      _Version        =   393217
      Enabled         =   -1  'True
      ScrollBars      =   3
      TextRTF         =   $"MainFrm.frx":7F29
   End
   Begin RichTextLib.RichTextBox t1 
      Height          =   1695
      Left            =   120
      TabIndex        =   1
      Top             =   0
      Width           =   6015
      _ExtentX        =   10610
      _ExtentY        =   2990
      _Version        =   393217
      Enabled         =   -1  'True
      ScrollBars      =   3
      TextRTF         =   $"MainFrm.frx":7FC6
   End
   Begin VB.CommandButton Encrypt 
      Caption         =   "加密"
      Height          =   330
      Left            =   120
      TabIndex        =   0
      Top             =   1965
      Width           =   1215
   End
   Begin VB.Label Label11 
      Caption         =   "字符串长度:"
      Height          =   255
      Index           =   1
      Left            =   240
      TabIndex        =   23
      Top             =   7110
      Width           =   1695
   End
   Begin VB.Label ResLenLbl 
      Height          =   255
      Left            =   1920
      TabIndex        =   22
      Top             =   7080
      Width           =   4095
   End
   Begin VB.Label ChrLenLbl 
      Height          =   255
      Left            =   1800
      TabIndex        =   21
      Top             =   1710
      Width           =   4095
   End
   Begin VB.Label Label11 
      Caption         =   "字符串长度:"
      Height          =   255
      Index           =   0
      Left            =   120
      TabIndex        =   20
      Top             =   1725
      Width           =   1695
   End
   Begin VB.Label Label5 
      Caption         =   "结果 (如果使用加密文件将保存到一个文件):"
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   4680
      Width           =   6015
   End
   Begin VB.Menu SettingCmd 
      Caption         =   "设置"
   End
End
Attribute VB_Name = "MainFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居汉化收藏整理
'发布日期:2007/03/15
'描    述:SINE256加密可视化以及控制示例
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Option Explicit

'Let me explain what the graph does!
'This is the base algorithm where X value is the position in the string to encrypt
'This 100% came out of my mind and i personnaly never saw any encryption using this method
'If you know whats a Sin() and how it look in a graph you can read the rest
'decal is the X interval between each time Y hit 0 or whatever is your range and start value
'*Note Higher decal = more chance of character repetition
'Start is the Y starting position
'Range is the Minimum and maximum Y can reach ex: Start - Range is minimum and Start + Range is maximum
'Dont use higher range than start position and dont make it get past 256
'USING A 0 RANGE DOES NOT MEAN THE ENCRYPTED VERSION WILL BE 1 KIND OF CHR
'IN THE ENCRYPTION THE Y VALUE IS MODIFIED



Private Sub DecryptFile_Click()
Encrypt.Enabled = False 'Make button impossible to use
Decrypt.Enabled = False 'Make button impossible to use
EncryptFile.Enabled = False 'Make button impossible to use
DecryptFile.Enabled = False 'Make button impossible to use
DoEvents
    'Master variables initializing
    Dim Path As String 'Var holding path of file to encrypt or decrypt
    Dim SavePath As String 'Var holding the save path
    Dim st As Long 'Var holding value of GetTickCount when action start (Statistics)
    Dim Crypt() As Byte 'Variable getting file data (This var get resized and get different size of the file for optimization)
    Dim Res() As Byte 'This is same as Crypt() but its the datas once encrypted (Array is gonna be EXACT SAME SIZE)
    'Show Unused in stats frame
    StatsLbl(0).Caption = "Unused" 'Show that those kind of stats arent used with files
    StatsLbl(1).Caption = "Unused" 'Show that those kind of stats arent used with files
    StatsLbl(2).Caption = "Unused" 'Show that those kind of stats arent used with files
    StatsLbl(3).Caption = "Unused" 'Show that those kind of stats arent used with files
    '###Get file to encrypt###
    Dlg.DialogTitle = "Select File to Encrypt/Decrypt"

⌨️ 快捷键说明

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