/// <summary> /// 加密字符串 /// </summary> /// <param name="strSource"></param> /// <param name="type"></param> /// <returns></returns> public static string Encrypt(string strSource, int type) { try { EncryptCore encryptCore = new EncryptCore(); if (type == 1) { return(encryptCore.Encrypt(strSource, EncryptKey, EncryptIV)); } else if (type == 2) { return(encryptCore.Encrypt(strSource, SSOTicketKey, SSOTicketIV)); } return(encryptCore.Encrypt(strSource, EncryptKey, EncryptIV)); } catch { return(""); } }
/// <summary> /// Encrypt加密 /// </summary> /// <param name="strSource"></param> /// <returns></returns> public static string Encrypt(string strSource) { try { EncryptCore encryptCore = new EncryptCore(); return(encryptCore.Encrypt(strSource, EncryptKey, EncryptIV)); } catch { return(""); } }