Exemple #1
0
        public static bool RsaCheck(string content, string sign, string publicKeyPlatform, Encoding charset,
                                    SignType signType)
        {
            RSAHelper rsa = new RSAHelper(signType, charset, null, publicKeyPlatform);

            return(rsa.Verify(content, sign));
        }
Exemple #2
0
        /// <summary>
        /// 构建签名
        /// </summary>
        /// <returns>The sign.</returns>
        /// <param name="parameters">参数.</param>
        /// <param name="privateKey">私钥.</param>
        /// <param name="charset">字符集.</param>
        /// <param name="signType">签名类型.</param>
        public static string CreateSign(IDictionary <string, string> parameters, string privateKey, Encoding charset, SignType signType)
        {
            RSAHelper rsa     = new RSAHelper(signType, charset, privateKey, null);
            string    content = GetSignContent(parameters);

            return(rsa.Sign(content));
        }