public static string SECURITY_ContentDecrypt(string Str) { string[] p = new string[1]; p[0] = Str; if (ParaHelper.IsParameterUnSafe(p)) { return("-2"); } string ret = Str.Substring(3, Str.Length - 7); byte[] outputb = Convert.FromBase64String(ret); string orgStr = Encoding.Default.GetString(outputb); return(orgStr); }
public static string SECURITY_ContentEncrypt(string Str) { string[] p = new string[1]; p[0] = Str; if (ParaHelper.IsParameterUnSafe(p)) { return("-2"); } byte[] bytes = Encoding.Default.GetBytes(Str); string ret = Convert.ToBase64String(bytes); ret = GenerateRandom(3) + ret + GenerateRandom(4); return(ret); }