/// <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)); } }
public static string SignAopRequest(IDictionary <string, string> parameters, string privateKeyPem, string charset, bool keyFromFile, string signType) { return(AlipaySignature.RSASign(parameters, privateKeyPem, charset, keyFromFile, signType)); }
/// <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)); }
/// <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")); }
/// <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)); }