Beispiel #1
0
 /// <summary>
 /// DES加密
 /// </summary>
 /// <param name="str">待加密字符串</param>
 /// <param name="encryptKey">加密密钥</param>
 /// <returns>返回DES加密结果</returns>
 public static string ToDES(this string str, string encryptKey)
 {
     return(SecurityHelper.ToDES(str, encryptKey));
 }
Beispiel #2
0
 /// <summary>
 /// DES解密
 /// </summary>
 /// <param name="str">待解密字符串</param>
 /// <param name="decryptKey">解密密钥</param>
 /// <returns>返回使用DES解密后的结果</returns>
 public static string FromDES(this string str, string decryptKey)
 {
     return(SecurityHelper.FromDES(str, decryptKey));
 }
Beispiel #3
0
 /// <summary>
 /// MD5加密
 /// </summary>
 /// <param name="str">待加密的字符串</param>
 /// <returns>加密后的md5值</returns>
 public static string ToMD5(this string str)
 {
     return(SecurityHelper.ToMD5(str));
 }