请帮助我有关此功能

请帮助我有关此功能

本文介绍了请帮助我有关此功能.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们!我已经下载了VB源代码.在此源代码中,我找到了一个功能.功能如下

Dear Friends! I have downloaded a VB Source Code. In this source code I have found a Function. The Function is as follows

Private Function XorPassword(Bytes As Variant) As String
    Dim XorBytes()      As Variant
    Dim strPassword     As String
    Dim intIndex        As Integer
    Dim CurrChar        As String * 1
    XorBytes = Array(&H86, &HFB, &HEC, &H37, &H5D, &H44, &H9C, &HFA, &HC6, &H5E, &H28,HE6, &H13, &HB6, &H8A, &H60, &H54, &H94)
    strPassword = vbNullString
    intIndex = 0
    Do
    'Get a character from the password by doing a XOR with the
    'appropriate value in XorBytes array.
        CurrChar = Chr$(Bytes(intIndex + &H42) Xor XorBytes(intIndex))
        'If we get a Null character, get out of the loop.
        If Asc(CurrChar) = 0 Then Exit Do
        'Add the password character to the accumulated password string.
        strPassword = strPassword & CurrChar
        intIndex = intIndex + 1
    Loop Until intIndex = 17
    XorPassword = strPassword
End Function



在此函数中,我无法理解以下数组



In this Function I could not understand the following array

XorBytes = Array(&H86, &HFB, &HEC, &H37, &H5D, &H44, &H9C, &HFA, &HC6, &H5E, &H28,HE6, &H13, &HB6, &H8A, &H60, &H54, &H94)



我的问题是,为什么他在此数组中使用了这些十六进制值,其背后的逻辑是什么?

请帮我解决这个问题.我将感谢您.



My Question is that Why he has used these Hex Values in this array and what is the logic behind that?

Plz Help me about this. I will be thankful to you.

推荐答案



在此函数中,我无法理解以下数组



In this Function I could not understand the following array

XorBytes = Array(&H86, &HFB, &HEC, &H37, &H5D, &H44, &H9C, &HFA, &HC6, &H5E, &H28,HE6, &H13, &HB6, &H8A, &H60, &H54, &H94)



我的问题是,为什么他在此数组中使用了这些十六进制值,其背后的逻辑是什么?

请帮我解决这个问题.我将感谢您.



My Question is that Why he has used these Hex Values in this array and what is the logic behind that?

Plz Help me about this. I will be thankful to you.




这篇关于请帮助我有关此功能.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 17:29