/// <summary>
///
/// </summary>
/// <param name="data">代签数据</param>
/// <returns></returns>
public static string Sign(byte[] data)
{
try
{
var rsa = new System.Security.Cryptography.RSACryptoServiceProvider();
rsa.ImportRSAPrivateKey(Convert.FromBase64String(secretKey), out var read);
var signData = rsa.SignHash(data, HashAlgorithmName.MD5, RSASignaturePadding.Pkcs1);
return Convert.ToBase64String(signData);
}
catch(Exception ex)
{
return "";
}
}