我要对一段文字进行des加密,谁有des加密的原代码谢谢如:dim a="123456"  对a 进行加密b=加密结果谢谢你们哦

解决方案 »

  1.   

    请google,然后自己动手:)参考代码:http://blog.yesky.com/Blog/jfzlnyf/archive/2005/02/12/73801.html
      

  2.   

    我在网上找了个des加密 控件我想知道des的加密 中的密钥是什么意思呀,还有明文又是什么呀 谢谢,我急在线等救我哦
      

  3.   

    那我得到的怎么会是乱码呢
    我的代码是
    Dim output(8) As Integer
    Private Sub Command1_Click()
    '加密
       Dim i As Integer
       Dim strng As String
      ' ApexDes1.Key = Text3.Text
       strng = StrConv(Text1.Text, vbFromUnicode)
       For i = 0 To 7
       If i < (LenB(strng)) Then
          output(i) = AscB(MidB(strng, i + 1, 1))
       Else
          output(i) = AscB(" ")
       End If
      Next i
       
      ApexDes1.Crypt 1, output(0)  strng = ""
      For i = 0 To 7
       strng = strng & ChrB(output(i))
      Next i
      Text2.Text = StrConv(strng, vbUnicode)
      c = LenB(Trim(Text2.Text))
    MsgBox c
    End SubPrivate Sub Command2_Click()
    '解密
      Dim i As Integer
      Dim strng As String
     ' ApexDes1.Key = Text3.Text
      ApexDes1.Crypt 0, output(0)  strng = ""
      For i = 0 To 7
       strng = strng & ChrB(output(i))
      Next i
      Text2.Text = StrConv(strng, vbUnicode)End Sub
    是用的控件