网站导航网学 原创论文 原创专题 网站设计 最新系统 原创论文 论文降重 发表论文 论文发表 UI设计定制 论文答辩PPT格式排版 期刊发表 论文专题
返回网学首页
网学原创论文
最新论文 推荐专题 热门论文 论文专题
当前位置: 网学 > 交易代码 > 课程设计 > 正文

凯撒密码VB方法

论文降重修改服务、格式排版等 获取论文 论文降重及排版 论文发表 相关服务
凯撒密码VB方法Form1 = 44, 58, 635, 507, C, 16, 50, 607, 499, CForm2 = 84, 99, 675, 548, C, 60, 19, 651, 468, CForm3 = -2, 0, 741, 551, , 42, 8, 706, 539, CForm4 = 16, 28, 722, 604, C, 36, 11, 710, 533, CType=ExeForm=Form1.frmReference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\system32\stdole2.tlb#OLE AutomationForm=Form2.frmForm=Form3.frmForm=Form4.frmIconForm="Form1"Startup="Form1"ExeName32="凯撒.exe"Path32="0408008402刘夏毓\VB方法"Command32=""Name="工程1"HelpContextID="0"CompatibleMode="0"MajorVer=1MinorVer=0RevisionVer=0AutoIncrementVer=0ServerSupportFiles=0VersionCompanyName="JUJUMAO"CompilationType=0凯撒密码VB方法FlPointCheck=0FDIVCheck=0UnroundedFP=0StartMode=0Unattended=0Retained=0ThreadPerObject=0MaxNumberOfThreads=1
[MS Transaction Server]AutoRefresh=1VERSION 5.00Begin VB.Form Form4    Caption         =   "Form4"   ClientHeight    =   5325   ClientLeft      =   60   ClientTop       =   450   ClientWidth     =   8955   LinkTopic       =   "Form4"   ScaleHeight     =   5085   ScaleMode       =   0  'User   ScaleWidth      =   8445   StartUpPosition =   3  '窗口缺省   Begin VB.CommandButton Command3       Caption         =   "返回"      BeginProperty Font          Name            =   "宋体"         Size            =   12         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      Height          =   615      Left            =   6600      TabIndex        =   10      Top             =   4320      Width           =   1935   End   Begin VB.CommandButton Command2       Caption         =   "清除"      BeginProperty Font          Name            =   "宋体"         Size            =   12         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      Height          =   615      Left            =   3840      TabIndex        =   9      Top             =   4320      Width           =   1935若图片无法显示请联系QQ3710167,凯撒密码VB方法系统免费,转发请注明源于www.lwfree.cn         Size            =   12         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      Height          =   615      Left            =   1080      TabIndex        =   8      Top             =   4320      Width           =   1815   End   Begin VB.Frame Frame2       Caption         =   "输出数据框"      Height          =   3495      Left            =   5040      TabIndex        =   1      Top             =   480      Width           =   3735      Begin VB.TextBox Text3          BeginProperty Font             Name            =   "宋体"            Size            =   14.25            Charset         =   134            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   495         Left            =   480         TabIndex        =   7         Top             =   1440         Width           =   3015      End      Begin VB.Label Label3          Caption         =   "明文为:"         BeginProperty Font             Name            =   "宋体"            Size            =   12            Charset         =   134            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   495         Left            =   240         TabIndex        =   6         Top             =   840         Width           =   1575      End   End   Begin VB.Frame Frame1       Caption         =   "输入数据框"      Height          =   3495      Left            =   360      TabIndex        =   0      Top             =   480      Width           =   4095      Begin VB.TextBox Text2          BeginProperty Font             Name            =   "宋体"            Size            =   14.25            Charset         =   134            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   495         IMEMode         =   3  'DISABLE         Left            =   1440         PasswordChar    =   "*"         TabIndex        =   5         Top             =   1800         Width           =   2295      End      Begin VB.TextBox Text1          BeginProperty Font             Name            =   "宋体"            Size            =   14.25            Charset         =   134            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   495         Left            =   1440         TabIndex        =   4         Top             =   720         Width           =   2295      End      Begin VB.Label Label2          Caption         =   "请输入密钥:"         BeginProperty Font             Name            =   "宋体"            Size            =   12            Charset         =   134            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   375         Left            =   120         TabIndex        =   3         Top             =   1920         Width           =   1455      End      Begin VB.Label Label1          Caption         =   "请输入秘文:"         BeginProperty Font             Name            =   "宋体"            Size            =   12            Charset         =   134            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   495         Left            =   120         TabIndex        =   2         Top             =   840         Width           =   1455      End   EndEndAttribute VB_Name = "Form4"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalsePrivate Function f(ByVal a As String, k As Integer) As StringIf ((Asc(a) >= 65 And Asc(a) <= 90)) And Len(a) = 1 Then If ((Asc(a) - k Mod 26) < 65) Then m = Asc(a) - k Mod 26 + 26 f = Chr(m + 32)Else f = Chr(Asc(a) - k Mod 26 + 32)End IfEnd IfEnd Function
Private Sub Command1_Click()Dim shuru As StringDim shuchu As StringDim k As IntegerDim n As IntegerDim i As LongDim tmp As StringIf Not IsNumeric(Text2.Text) ThenMsgBox "输入的密钥应为数字!", 64, "信息提示"Text2.Text = ""Elsek = Text2.TextEnd Ifshuru = Text1.Text '要解密的字符串For i = 1 To Len(shuru)tmp = Mid(shuru, i, 1)tmp = f(tmp, k)If tmp <> "error" Thenshuchu = shuchu + tmpElseMsgBox "字符串中含有非法字符"Exit SubEnd IfNext iText3.Text = shuchuEnd Sub
Private Sub Command2_Click()Text1.Text = ""Text2.Text = ""Text3.Text = ""End Sub
Private Sub Command3_Click()Form4.HideForm2.Show
End SubVERSION 5.00Begin VB.Form Form3    Caption         =   "Form3"   ClientHeight    =   5085   ClientLeft      =   60   ClientTop       =   450   ClientWidth     =   8445   LinkTopic       =   "Form3"   ScaleHeight     =   5085   ScaleWidth      =   8445   StartUpPosition =   3  '窗口缺省   Begin VB.CommandButton Command3       Caption         =   "清除"      BeginProperty Font          Name            =   "宋体"         Size            =   14.25         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      Height          =   615      Left            =   3480      TabIndex        =   10      Top             =   4320      Width           =   1815   End   Begin VB.CommandButton Command2       Caption         =   "返回"      BeginProperty Font          Name            =   "宋体"         Size            =   15         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      Height          =   615      Left            =   5880      TabIndex        =   3      Top             =   4320      Width           =   1815   End   Begin VB.CommandButton Command1       Caption         =   "加密"      BeginProperty Font          Name            =   "宋体"         Size            =   15         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      Height          =   615      Left            =   840      TabIndex        =   2      Top             =   4320      Width           =   1815   End   Begin VB.Frame Frame2       Caption         =   "输出数据框"      Height          =   3255      Left            =   4680      TabIndex        =   1      Top             =   720      Width           =   3135      Begin VB.TextBox Text3          BeginProperty Font             Name            =   "宋体"            Size            =   14.25            Charset         =   134            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   495         Left            =   360         TabIndex        =   9         Top             =   1320         Width           =   2295      End      Begin VB.Label Label3          Caption         =   "密文为:"         BeginProperty Font             Name            =   "宋体"            Size            =   14.25            Charset         =   134            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   495         Left            =   240         TabIndex        =   8         Top             =   720         Width           =   1335      End   End   Begin VB.Frame Frame1       Caption         =   "输入数据框"      Height          =   3255      Left            =   480      TabIndex        =   0      Top             =   720      Width           =   3615      Begin VB.TextBox Text2          BeginProperty Font             Name            =   "宋体"            Size            =   14.25            Charset         =   134            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   495         IMEMode         =   3  'DISABLE         Left            =   1440         PasswordChar    =   "*"若图片无法显示请联系QQ3710167,凯撒密码VB方法系统免费,转发请注明源于www.lwfree.cn            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   495         Left            =   1440         TabIndex        =   5         Top             =   720         Width           =   2055      End      Begin VB.Label Label2          Caption         =   "请输入密钥:"         BeginProperty Font             Name            =   "宋体"            Size            =   12            Charset         =   134            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   375         Left            =   120         TabIndex        =   6         Top             =   2040         Width           =   1455      End      Begin VB.Label Label1          Caption         =   "请输入明文:"         BeginProperty Font             Name            =   "宋体"            Size            =   12            Charset         =   134            Weight          =   400            Underline       =   0   'False            Italic          =   0   'False            Strikethrough   =   0   'False         EndProperty         Height          =   375         Left            =   120         TabIndex        =   4         Top             =   840         Width           =   1455      End   EndEndAttribute VB_Name = "Form3"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalsePrivate Function f(ByVal a As String, k As Integer) As StringIf ((Asc(a) >= 97 And Asc(a) <= 122)) And Len(a) = 1 ThenIf ((Asc(a) + k Mod 26) > 122) Thenm = Asc(a) + k Mod 26 - 26f = Chr(m - 32)Elsef = Chr((Asc(a) + k Mod 26) - 32)End IfEnd IfEnd Function
Private Sub Command1_Click()Dim shuru As StringDim shuchu As StringDim k As IntegerDim n As IntegerDim i As LongDim tmp As StringIf Not IsNumeric(Text2.Text) ThenMsgBox "输入的密钥应为数字!", 64, "信息提示"Text2.Text = ""Elsek = Text2.TextEnd Ifshuru = Text1.Text
 For i = 1 To Len(shuru)
 tmp = Mid(shuru, i, 1) tmp = f(tmp, k)
If tmp <> "error" Thenshuchu = shuchu + tmpElseMsgBox "字符串中含有非法字符"Exit SubEnd IfNext iText3.Text = shuchuEnd Sub
Private Sub Command2_Click()Form3.HideForm2.Show
End Sub
Private Sub Command3_Click()Text1.Text = ""Text2.Text = ""Text3.Text = ""
End SubVERSION 5.00Begin VB.Form Form2    Caption         =   "Form2"   ClientHeight    =   3585   ClientLeft      =   60   ClientTop       =   450   ClientWidth     =   5055   LinkTopic       =   "Form2"   ScaleHeight     =   3585   ScaleWidth      =   5055   StartUpPosition =   3  '窗口缺省   Begin VB.CommandButton Command2       Caption         =   "退出"      BeginProperty Font          Name            =   "宋体"         Size            =   14.25         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      Height          =   615      Left            =   2760      TabIndex        =   5      Top             =   2760      Width           =   1575   End   Begin VB.CommandButton Command1       Caption         =   "确定"      BeginProperty Font          Name            =   "宋体"         Size            =   15.75         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      Height          =   615      Left            =   360      TabIndex        =   4      Top             =   2760      Width           =   1695   End   Begin VB.OptionButton Option2       Caption         =   "Option2"      Height          =   375      Left            =   1200      TabIndex        =   1      Top             =   1760      Width           =   255   End   Begin VB.OptionButton Option1       Caption         =   "Option1"      Height          =   375      Left            =   1200      TabIndex        =   0      Top             =   1050      Width           =   255   End   Begin VB.Label Label2       Caption         =   "解密"      BeginProperty Font          Name            =   "宋体"         Size            =   15.75         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      Height          =   495      Left            =   1560      TabIndex        =   3      Top             =   1800      Width           =   1215   End   Begin VB.Label Label1       Caption         =   "加密"      BeginProperty Font          Name            =   "宋体"         Size            =   15.75         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      Height          =   375      Left            =   1560      TabIndex        =   2      Top             =   1080      Width           =   1215   EndEndAttribute VB_Name = "Form2"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalsePrivate Sub Command1_Click()Form2.HideIf Option1.Value = True ThenForm3.ShowElseForm4.ShowEnd If
End Sub
Private Sub Command2_Click()EndEnd SubVERSION 5.00Begin VB.Form Form1    Caption         =   "Form1"   ClientHeight    =   5205   ClientLeft      =   60   ClientTop       =   450   ClientWidth     =   8280   ForeColor       =   &H000000FF&   LinkTopic       =   "Form1"   ScaleHeight     =   5205   ScaleWidth      =   8280   StartUpPosition =   3  '窗口缺省   Begin VB.CommandButton Command1       BackColor       =   &H00C0C0C0&      Caption         =   "确定"      BeginProperty Font          Name            =   "宋体"         Size            =   14.25         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      Height          =   735      Left            =   3000      TabIndex        =   1      Top             =   3240      Width           =   2055   End   Begin VB.Label Label1       Caption         =   "欢迎进入凯撒密码世界!"      BeginProperty Font          Name            =   "宋体"         Size            =   26.25         Charset         =   134         Weight          =   400         Underline       =   0   'False         Italic          =   0   'False         Strikethrough   =   0   'False      EndProperty      ForeColor       =   &H00808080&      Height          =   615      Left            =   1200      TabIndex        =   0      Top             =   1680      Width           =   6015   EndEndAttribute VB_Name = "Form1"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalsePrivate Sub Command1_Click()Form1.HideForm2.Show
End Sub
  • 上一篇资讯: 银行家算法C语言实现
  • 下一篇资讯: 恺撒密码C++代码
  • 设为首页 | 加入收藏 | 网学首页 | 原创论文 | 计算机原创
    版权所有 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2020 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号 常年法律顾问:王律师