コード例 #1
0
 /// <summary>
 /// 加密字符串 密钥为系统默认
 /// </summary>
 /// <param name="inputStr">输入字符串</param>
 /// <returns>输出加密后字符串</returns>
 static public string SEncryptString(string inputStr)
 {
     MySecurity ws = new MySecurity();
     return ws.EncryptString(inputStr, "");
 }
コード例 #2
0
 /// <summary>
 /// 解密字符串
 /// </summary>
 /// <param name="inputStr">要解密的字符串</param>
 /// <param name="keyStr">密钥</param>
 /// <returns>解密后的结果</returns>
 static public string SDecryptString(string inputStr, string keyStr)
 {
     MySecurity ws = new MySecurity();
     return ws.DecryptString(inputStr, keyStr);
 }