标题:有没有大神在帮忙看一下,想写一个加密程序,把数字加密成对应字母,但是出 ...
只看楼主
ZHRXJR
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:125
帖 子:1034
专家分:5519
注 册:2016-5-10
得分:0 
逆向编程将可以了呀

程序代码:
Dim CH

Private Sub Command1_Click()
Dim Strx As String, chx As String, I As Integer
  For I = 1 To Len(Text1.Text)
   chx = Mid(Text1.Text, I, 1)
      Strx = Strx & CH(Val(chx))
    Next I
   Text2.Text = Strx
End Sub

Private Sub Command2_Click()
Dim Strx As String, chx As String, I As Integer, J As Integer
  For I = 1 To Len(Text2.Text)
   chx = Mid(Text2.Text, I, 1)   '得到单个字符
   For J = 0 To 9
    If chx = CH(J) Then    '历遍数组 CH 判断是哪个字符。
        Strx = Strx & J   '检测当前字符在数组中的位置。
    End If
   Next J
    Next I
   Text3.Text = Strx
End Sub

Private Sub Form_Load()
CH = Array("n", "p", "m", "x", "b", "t", "s", "g", "e", "w")
End Sub


数组变量 CH 是模块级数组变量。

请不要选我!!!
2018-11-06 04:10
起个名好难
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2018-10-20
得分:0 
我自己实现的方法是取ascii码
2018-11-10 16:49



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-490529-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.102037 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved