C# 클래스 ChiakiYu.Common.Data.UserPasswordHelper

用户密码辅助工具类
파일 보기 프로젝트 열기: andyshao/ChiakiYu

공개 메소드들

메소드 설명
Base64_Decode ( string str ) : string

base64解码

Base64_Encode ( string str ) : string

base64编码

CheckPassword ( string password, string storedPassword, UserPasswordFormat passwordFormat ) : bool

检查用户密码是否正确

EncodePassword ( string password, UserPasswordFormat passwordFormat ) : string

对用户密码进行编码

MD5 ( string str ) : string

标准MD5加密

MD5_16 ( string str ) : string

16位的MD5加密

메소드 상세

Base64_Decode() 공개 정적인 메소드

base64解码
public static Base64_Decode ( string str ) : string
str string 待解码的字符串
리턴 string

Base64_Encode() 공개 정적인 메소드

base64编码
public static Base64_Encode ( string str ) : string
str string 待编码的字符串
리턴 string

CheckPassword() 공개 정적인 메소드

检查用户密码是否正确
public static CheckPassword ( string password, string storedPassword, UserPasswordFormat passwordFormat ) : bool
password string 用户录入的用户密码(尚未加密的密码)
storedPassword string 数据库存储的密码(即加密过的密码)
passwordFormat UserPasswordFormat 用户密码存储格式
리턴 bool

EncodePassword() 공개 정적인 메소드

对用户密码进行编码
public static EncodePassword ( string password, UserPasswordFormat passwordFormat ) : string
password string 需要加密的用户密码
passwordFormat UserPasswordFormat 用户密码存储格式
리턴 string

MD5() 공개 정적인 메소드

标准MD5加密
public static MD5 ( string str ) : string
str string 待加密的字符串
리턴 string

MD5_16() 공개 정적인 메소드

16位的MD5加密
public static MD5_16 ( string str ) : string
str string 待加密的字符串
리턴 string