数据库的代码密码 [英] Code password for database

查看:101
本文介绍了数据库的代码密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我的公司命令我创建考勤计划,我们有程序正在运行但是这家公司的应用程序已经完成,我们与他们没有任何联系以获得技术支持所以我编程程序就像我遇到的问题是密码登录它保存在数据库中加密当我以用户身份登录时我应该登录加密密码我在打开IT公司应用程序后查找用于加密.net反射器中的密码的功能但是我不懂字符串我寻找字符串我无法理解当我输入密码为0时,加密密码将为8,这里是用于IT公司应用程序的功能,我希望能帮助我。



hi everyone my Company ordered me to create program for Time attendance we have program working but this application for IT company this company finished and we have no connection to them for technical support so I programmed program like that the problem I faced is password login it is saved in database encrypted when I log as user i should log for encrypted password i look for function used to encrypt password in .net reflector after I open IT company application but i do not understand strings I look for Strings I could not understand simply when i enter password like 0 the encrypted password will be 8 and here is the function used for IT company application I hope to help me .

 public static string CodingPasswordFun(string OldStr)
{
    string str2;
    string str3;
    string str4;
    string str5;
    string str6;
    int num2;
    int num3 = Strings.Len(OldStr);
    for (num2 = 1; num2 <= num3; num2++)
    {
        str5 = Strings.Mid(OldStr, num2, 1);
        str2 = str2 + str5;
        if (num2 == 2)
        {
            str2 = str2 + "A";
        }
        else if (num2 == 4)
        {
            str2 = str2 + "D";
        }
        else if (num2 == 6)
        {
            str2 = str2 + "E";
        }
        else if (num2 == 8)
        {
            str2 = str2 + "L";
        }
    }
    int num4 = Strings.Len(str2);
    for (int i = 1; i <= num4; i++)
    {
        str5 = Strings.Mid(str2, i, 1);
        str6 = str6 + str5;
        switch (i)
        {
            case 3:
                str6 = str6 + "B";
                break;

            case 5:
                str6 = str6 + "E";
                break;

            case 7:
                str6 = str6 + "T";
                break;

            case 9:
                str6 = str6 + "A";
                break;
        }
    }
    int num5 = Strings.Len(str6);
    for (num2 = 1; num2 <= num5; num2++)
    {
        string str8 = Strings.Mid(str6, num2, 1);
        str4 = str4 + Conversions.ToString(Strings.Asc(str8));
    }
    int num6 = Strings.Len(str4);
    for (num2 = 1; num2 <= num6; num2++)
    {
        if ((num2 % 2) == 0)
        {
            string str7 = Strings.Mid(str4, num2, 2);
            if ((((Conversions.ToDouble(str7) >= 65.0) & (Conversions.ToDouble(str7) <= 90.0)) | ((Conversions.ToDouble(str7) >= 97.0) & (Conversions.ToDouble(str7) <= 122.0))) | (Conversions.ToDouble(str7) == 45.0))
            {
                str3 = str3 + Conversions.ToString(Strings.Chr(Conversions.ToInteger(str7)));
            }
            else
            {
                str3 = str3 + str7;
            }
        }
    }
    return str3;
}





我的尝试:





What I have tried:

 public static string CodingPasswordFun(string OldStr)
{
    string str2;
    string str3;
    string str4;
    string str5;
    string str6;
    int num2;
    int num3 = Strings.Len(OldStr);
    for (num2 = 1; num2 &lt;= num3; num2++)
    {
        str5 = Strings.Mid(OldStr, num2, 1);
        str2 = str2 + str5;
        if (num2 == 2)
        {
            str2 = str2 + "A";
        }
        else if (num2 == 4)
        {
            str2 = str2 + "D";
        }
        else if (num2 == 6)
        {
            str2 = str2 + "E";
        }
        else if (num2 == 8)
        {
            str2 = str2 + "L";
        }
    }
    int num4 = Strings.Len(str2);
    for (int i = 1; i &lt;= num4; i++)
    {
        str5 = Strings.Mid(str2, i, 1);
        str6 = str6 + str5;
        switch (i)
        {
            case 3:
                str6 = str6 + "B";
                break;

            case 5:
                str6 = str6 + "E";
                break;

            case 7:
                str6 = str6 + "T";
                break;

            case 9:
                str6 = str6 + "A";
                break;
        }
    }
    int num5 = Strings.Len(str6);
    for (num2 = 1; num2 &lt;= num5; num2++)
    {
        string str8 = Strings.Mid(str6, num2, 1);
        str4 = str4 + Conversions.ToString(Strings.Asc(str8));
    }
    int num6 = Strings.Len(str4);
    for (num2 = 1; num2 &lt;= num6; num2++)
    {
        if ((num2 % 2) == 0)
        {
            string str7 = Strings.Mid(str4, num2, 2);
            if ((((Conversions.ToDouble(str7) &gt;= 65.0) &amp; (Conversions.ToDouble(str7) &lt;= 90.0)) | ((Conversions.ToDouble(str7) &gt;= 97.0) &amp; (Conversions.ToDouble(str7) &lt;= 122.0))) | (Conversions.ToDouble(str7) == 45.0))
            {
                str3 = str3 + Conversions.ToString(Strings.Chr(Conversions.ToInteger(str7)));
            }
            else
            {
                str3 = str3 + str7;
            }
        }
    }
    return str3;
}

推荐答案

此Google搜索链接为您提供了许多不同的方法来满足您的要求: c#密码加密2017 - Google搜索 [ ^ ]



选择能为客户提供所需安全保障的产品。
This Google Search link gives you many different ways to do what you are asking: c# password encryption 2017 - Google Search[^]

Choose the one that gives your client the security that they need.


这篇关于数据库的代码密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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