C# Class Cedar.Framework.Common.BaseClasses.Encryptor

For 加密解密的常用算法,DES,MD5,SHA1,RSA,Rijndael,...此类不能被代码格式化;
Show file Open project: Chinaccn/surfboard

Public Methods

Method Description
DecryptDes ( string encryptString ) : string

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 使用默认密钥【DES解密】(重载) }

DecryptDes ( string decryptString, string decryptKey ) : string

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 【DES解密字符串】 }

DecryptId ( string encryptString ) : string

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 使用默认密钥【对url或id解密】(重载) }

DecryptId ( string decryptString, string decryptKey ) : string

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 【DES解密url或id】 }

Encrypt16Md5 ( string inStr ) : string

{ Coder:Tim,At:[ 2015-09-23 17:27 ],For 【MD5加密返回16位】 }

Encrypt32Md5 ( string inStr ) : string

{ Coder:Tim,At:[ 2015-09-23 17:27 ],For 【MD5加密返回32位】 }

EncryptAes ( string plainStr ) : string

AES加密

EncryptDes ( string encryptString ) : string

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 使用默认密钥【DES加密】(重载) }

EncryptDes ( string encryptString, string encryptKey ) : string

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 【DES加密字符串】 }

EncryptId ( string encryptString ) : string

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 使用默认密钥【对url或id加密】(重载) }

EncryptId ( string encryptString, string encryptKey ) : string

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 【DES加密url或id】 }

EncryptMd5 ( string inStr ) : string

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 默认的MD5加密(返回16位) }

EncryptSha1 ( string encryptString ) : string

{ For【安全哈希算法】SHA1有如下特性:不可以从消息摘要中复原信息;两个不同的消息不会产生同样的消息摘要 }

GenerateHash ( string filePathAndName ) : string

GetSecurity ( ) : string

安全码认证

Private Methods

Method Description
MD5Encrypt ( string str ) : string

MD5加密

Method Details

DecryptDes() public method

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 使用默认密钥【DES解密】(重载) }
public DecryptDes ( string encryptString ) : string
encryptString string
return string

DecryptDes() public method

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 【DES解密字符串】 }
public DecryptDes ( string decryptString, string decryptKey ) : string
decryptString string 待解密的字符串
decryptKey string 解密密钥,要求为8位,和加密密钥相同
return string

DecryptId() public method

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 使用默认密钥【对url或id解密】(重载) }
public DecryptId ( string encryptString ) : string
encryptString string
return string

DecryptId() public method

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 【DES解密url或id】 }
public DecryptId ( string decryptString, string decryptKey ) : string
decryptString string 待解密的字符串
decryptKey string 解密密钥,要求为8位,和加密密钥相同
return string

Encrypt16Md5() public method

{ Coder:Tim,At:[ 2015-09-23 17:27 ],For 【MD5加密返回16位】 }
public Encrypt16Md5 ( string inStr ) : string
inStr string inStr,要加密的字符串
return string

Encrypt32Md5() public method

{ Coder:Tim,At:[ 2015-09-23 17:27 ],For 【MD5加密返回32位】 }
public Encrypt32Md5 ( string inStr ) : string
inStr string inStr,要加密的字符串
return string

EncryptAes() public static method

AES加密
public static EncryptAes ( string plainStr ) : string
plainStr string
return string

EncryptDes() public method

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 使用默认密钥【DES加密】(重载) }
public EncryptDes ( string encryptString ) : string
encryptString string
return string

EncryptDes() public method

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 【DES加密字符串】 }
public EncryptDes ( string encryptString, string encryptKey ) : string
encryptString string 待加密的字符串
encryptKey string 加密密钥,要求为8位
return string

EncryptId() public method

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 使用默认密钥【对url或id加密】(重载) }
public EncryptId ( string encryptString ) : string
encryptString string
return string

EncryptId() public method

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 【DES加密url或id】 }
public EncryptId ( string encryptString, string encryptKey ) : string
encryptString string 待加密的字符串
encryptKey string 加密密钥,要求为8位
return string

EncryptMd5() public method

{ Coder:Tim,At:[ 2015-09-23 17:27 ], For 默认的MD5加密(返回16位) }
public EncryptMd5 ( string inStr ) : string
inStr string inStr,要加密的字符串
return string

EncryptSha1() public method

{ For【安全哈希算法】SHA1有如下特性:不可以从消息摘要中复原信息;两个不同的消息不会产生同样的消息摘要 }
public EncryptSha1 ( string encryptString ) : string
encryptString string 待加密字符
return string

GenerateHash() public static method

public static GenerateHash ( string filePathAndName ) : string
filePathAndName string
return string

GetSecurity() public method

安全码认证
public GetSecurity ( ) : string
return string