예제 #1
0
 /// <summary>
 /// 给AOP请求签名。
 /// <remarks>建议使用<code>AlipaySignature.RSASign(parameters, privateKeyPem)</code>></remarks>
 /// </summary>
 /// <param name="parameters">所有字符型的AOP请求参数</param>
 /// <param name="privateKeyPem">签名密钥</param>
 /// <returns>签名</returns>
 public static string SignAopRequest(IDictionary <string, string> parameters, string privateKeyPem, string charset)
 {
     try
     {
         return(AlipaySignature.RSASign(parameters, privateKeyPem, charset));
     }
     catch (Exception e)
     {
         throw new Exception(string.Format("请求签名失败!原因:{0}", e.Message));
     }
 }
예제 #2
0
 public static string SignAopRequest(IDictionary <string, string> parameters, string privateKeyPem, string charset, bool keyFromFile, string signType)
 {
     return(AlipaySignature.RSASign(parameters, privateKeyPem, charset, keyFromFile, signType));
 }
예제 #3
0
 /// <summary>
 /// 给AOP请求签名。
 /// <remarks>建议使用<code>AlipaySignature.RSASign(parameters, privateKeyPem)</code>></remarks>
 /// </summary>
 /// <param name="parameters">所有字符型的AOP请求参数</param>
 /// <param name="privateKeyPem">签名密钥</param>
 /// <returns>签名</returns>
 public static string SignAopRequest(IDictionary <string, string> parameters, string privateKeyPem)
 {
     return(AlipaySignature.RSASign(parameters, privateKeyPem));
 }
예제 #4
0
 /// <summary>
 /// 建议直接使用<code>AlipaySignature.RSASign(data, privateKeyPem)</code>
 /// </summary>
 /// <param name="data"></param>
 /// <param name="privateKeyPem"></param>
 /// <returns></returns>
 public static string RSASign(string data, string privateKeyPem, string charset)
 {
     return(AlipaySignature.RSASign(data, privateKeyPem, charset, "RSA"));
 }
예제 #5
0
 /// <summary>
 /// 建议直接使用<code>AlipaySignature.RSASign(data, privateKeyPem)</code>
 /// </summary>
 /// <param name="data"></param>
 /// <param name="privateKeyPem"></param>
 /// <returns></returns>
 public static string RSASign(string data, string privateKeyPem)
 {
     return(AlipaySignature.RSASign(data, privateKeyPem));
 }