加密密码-如何再次解密? [英] Encrypted password - How do you decrypt it again?

查看:136
本文介绍了加密密码-如何再次解密?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用此代码对密码进行了加密,但是现在我不知道如何再次对其进行解密.请帮帮我...

I encrypted a password using this code, and now I don''t know how to decrypt it again. Please help me out...

Public Function SimpleCrypt1( _
    ByVal encrypt As String) As String
       ' Encrypts/decrypts the passed string using
       ' a simple ASCII value-swapping algorithm
       Dim strTempChar As String, i As Integer
       For i = 1 To Len(Text)
           If Asc(Mid$(Text, i, 1)) < 128 Then
               strTempChar = _
         CType(Asc(Mid$(Text, i, 1)) + 128, String)
           ElseIf Asc(Mid$(Text, i, 1)) > 128 Then
               strTempChar = _
         CType(Asc(Mid$(Text, i, 1)) - 128, String)
           End If
           Mid$(Text, i, 1) = _
               Chr(CType(strTempChar, Integer))
       Next i
       Return Text
   End Function

推荐答案

(文本,i, 1 ))< 128 然后 strTempChar = _ CType (Asc(Mid
(Text, i, 1)) < 128 Then strTempChar = _ CType(Asc(Mid


(文本,i, 1 ))+ 128 字符串) ElseIf Asc(Mid
(Text, i, 1)) + 128, String) ElseIf Asc(Mid


(文本,i, 1 ) )> 128 然后 strTempChar = _ CType (Asc(Mid
(Text, i, 1)) > 128 Then strTempChar = _ CType(Asc(Mid


这篇关于加密密码-如何再次解密?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆