MD5和SHA1

public string EncryptStr(string PWD, int Format)
    {
        string str = "";
        switch (Format)
        {
            case 0:
                str = FormsAuthentication.HashPasswordForStoringInConfigFile(PWD, "SHA1");
                break;
            case 1:
                str = FormsAuthentication.HashPasswordForStoringInConfigFile(PWD, "MD5");
                break;
        }
        return str;
    }
posted @ 2011-07-11 10:07  灵大  阅读(129)  评论(0编辑  收藏  举报