Exemplo n.º 1
0
 /// <summary>
 /// AES加密
 /// <para>将一个对象用AES CBC的方式根据privateKey和publicKey进行加密</para>
 /// <para>公钥和私钥只能是可以通过Encoding.GetBytes转换的字符串,否则密钥验证会失效</para>
 /// </summary>
 /// <param name="content">要加密的对象</param>
 /// <param name="privateKey">私钥</param>
 /// <param name="publicKey">公钥</param>
 /// <returns></returns>
 public static string EncryptAES(this object content, string privateKey = "", string publicKey = "")
 {
     return(EncryptionUtil.EncryptAES(content, privateKey, publicKey));
 }