谁帮我翻译一下下面这段程序

来源:百度知道 编辑:UC知道 时间:2024/05/21 06:45:38
protected static string _getG(string uno)
{
string textToHash = HashString(HashString(uno) + Consts.salt.GetHashCode().ToString() + Consts.salt);
int num = 0;
while (textToHash.Length < 100)
{
switch (num)
{
case 0:
textToHash = textToHash + HashString(Consts.salt + textToHash.GetHashCode().ToString());
break;

case 1:
textToHash = textToHash + HashString(uno + textToHash.GetHashCode().ToString());
break;

case 2:
textToHash = textToHash + HashString(textToHash);
break;
}
if (num < 2)
{
num++;
}
else
{
num = 0;
}
}
return textToHash;
}

如果是下面这样调用函数_getG('0101-127990309-11

就是获取参数uno的Hash值。结果到底是多少,还有告诉我HashString函数和Consts是什么东西。

结果是:
BNehlYnEVq9YEM9WRa8cYnWAZag=4BeqZZWoCQnaEBre0mp1ku3Y4vQ=dgyrt0RIa0vHVr+Mdmf/Qxn/
V4g=b8vGCmRc14ydBhZ3L18cwwsL0hg=