




已阅读5页,还剩9页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
凯撒密码凯撒密码VBVB方法方法 课程设计课程设计 Form1 44 58 635 507 C 16 50 607 499 C Form2 84 99 675 548 C 60 19 651 468 C Form3 2 0 741 551 42 8 706 539 C Form4 16 28 722 604 C 36 11 710 533 C Type Exe Form Form1 frm Reference G 00020430 0000 0000 C000 000000000046 2 0 0 C WINDOWS system32 stdole2 tlb OLE Automation Form Form2 frm Form Form3 frm Form Form4 frm IconForm Form1 Startup Form1 ExeName32 凯撒 exe Path32 0408008402刘夏毓 VB方法 Command32 Name 工程1 HelpContextID 0 CompatibleMode 0 MajorVer 1 MinorVer 0 RevisionVer 0 AutoIncrementVer 0 ServerSupportFiles 0 VersionCompanyName JUJUMAO CompilationType 0 FlPointCheck 0 FDIVCheck 0 UnroundedFP 0 StartMode 0 Unattended 0 Retained 0 ThreadPerObject 0 MaxNumberOfThreads 1 MS Transaction Server AutoRefresh 1 VERSION 5 00 Begin 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 系统免费 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 End End Attribute VB Name Form4 Attribute VB GlobalNameSpace False Attribute VB Creatable False Attribute VB PredeclaredId True Attribute VB Exposed False Private Function f ByVal a As String k As Integer As String If 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 If End If End Function Private Sub Command1 Click Dim shuru As String Dim shuchu As String Dim k As Integer Dim n As Integer Dim i As Long Dim tmp As String If Not IsNumeric Text2 Text Then MsgBox 输入的密钥应为数字 64 信息提示 Text2 Text Else k Text2 Text End If shuru Text1 Text 要解密的字符串 For i 1 To Len shuru tmp Mid shuru i 1 tmp f tmp k If tmp error Then shuchu shuchu tmp Else MsgBox 字符串中含有非法字符 Exit Sub End If Next i Text3 Text shuchu End Sub Private Sub Command2 Click Text1 Text Text2 Text Text3 Text End Sub Private Sub Command3 Click Form4 Hide Form2 Show End SubVERSION 5 00 Begin 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 系统免费 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 End End Attribute VB Name Form3 Attribute VB GlobalNameSpace False Attribute VB Creatable False Attribute VB PredeclaredId True Attribute VB Exposed False Private Function f ByVal a As String k As Integer As String If Asc a 97 And Asc a 122 Then m Asc a k Mod 26 26 f Chr m 32 Else f Chr Asc a k Mod 26 32 End If End If End Function Private Sub Command1 Click Dim shuru As String Dim shuchu As String Dim k As Integer Dim n As Integer Dim i As Long Dim tmp As String If Not IsNumeric Text2 Text Then MsgBox 输入的密钥应为数字 64 信息提示 Text2 Text Else k Text2 Text End If shuru Text1 Text For i 1 To Len shuru tmp Mid shuru i 1 tmp f tmp k If tmp error Then shuchu shuchu tmp Else MsgBox 字符串中含有非法字符 Exit Sub End If Next i Text3 Text shuchu End Sub Private Sub Command2 Click Form3 Hide Form2 Show End Sub Private Sub Command3 Click Text1 Text Text2 Text Text3 Text End SubVERSION 5 00 Begin 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 End End Attribute VB Name Form2 Attribute VB GlobalNameSpace False Attribute VB Creatable False Attribute VB PredeclaredId True Attribute VB Exposed False Private Sub Command1 Click Form2 Hide If Option1 Value True Then Form3 Show Else Form4 Show End If
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年事业单位工勤技能-河北-河北保安员四级(中级工)历年参考题库含答案解析
- 2025年事业单位工勤技能-江西-江西机械热加工二级(技师)历年参考题库含答案解析(5套)
- 2025年事业单位工勤技能-江西-江西公路养护工五级(初级工)历年参考题库含答案解析(5套)
- 2025年事业单位工勤技能-江苏-江苏检验员一级(高级技师)历年参考题库含答案解析(5套)
- 2025年事业单位工勤技能-广西-广西环境监测工二级(技师)历年参考题库典型考点含答案解析
- 2025年事业单位工勤技能-广西-广西城管监察员二级(技师)历年参考题库典型考点含答案解析
- 2025年事业单位工勤技能-广西-广西农业技术员三级(高级工)历年参考题库典型考点含答案解析
- 2025年事业单位工勤技能-广东-广东管工(技师/高级技师)历年参考题库典型考点含答案解析
- 2025年事业单位工勤技能-广东-广东水利机械运行维护工三级(高级工)历年参考题库含答案解析
- 2025年事业单位工勤技能-广东-广东家禽饲养员五级(初级工)历年参考题库含答案解析
- DB15-T 3516-2024 野生动物救护站建设规范
- 《多彩的超轻粘土》校本课程教案(共10课)
- 上海市嘉定区2023-2024学年三年级下学期期末数学试卷
- 室间隔缺损教学查房
- MBA《会计学》课件-(济南)
- 班组长质量管理意识培训
- 传奇辅助脚本
- 四川省普通高中2024届高三上学期学业水平考试数学试题(解析版)
- 孕产妇健康知识宣传栏
- 部委管理制度
- 动车组随车机械师-动车组随车机械师作业标准
评论
0/150
提交评论