摘要: 1,log4net配置 <?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationS 阅读全文
posted @ 2021-02-24 16:39 元点 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1,枚举拓展 /// <summary> /// 获取枚举描述 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="enumItemName"></param> /// <returns></returns> pu 阅读全文
posted @ 2021-02-24 10:26 元点 阅读(385) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// Post 参数 /// </summary> /// <param name="param"></param> /// <param name="url"></param> /// <param name="timeout"></param> /// <retur 阅读全文
posted @ 2021-02-24 10:23 元点 阅读(676) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 证书帮助类 /// </summary> public class CertificateHelper { private static X509Certificate2 _cert; /// <summary> /// 证书文件转Base64 /// </sum 阅读全文
posted @ 2021-02-24 10:21 元点 阅读(440) 评论(0) 推荐(1) 编辑
摘要: public class TFSApiOptionsHelper { private static TFSApiOptionsHelper _onfigHelper = null; private static readonly object locker = new object(); priva 阅读全文
posted @ 2021-02-24 10:18 元点 阅读(237) 评论(0) 推荐(0) 编辑
摘要: public class TFSSortDictionary : SortedDictionary<string, object> { public TFSSortDictionary() { } public TFSSortDictionary(IDictionary<string, object 阅读全文
posted @ 2021-02-24 10:11 元点 阅读(227) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// rsa帮助类 /// </summary> public class RSAEncryptHelper { /// <summary> /// 创建RSA公钥私钥 /// </summary> public static void CreateRSAKey() { 阅读全文
posted @ 2021-02-24 10:06 元点 阅读(717) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// ras加密 /// </summary> public class SHA256WithRSAHelper { #region 加解密 /// <summary> /// 加密 /// </summary> /// <param name="contentForS 阅读全文
posted @ 2021-02-24 10:04 元点 阅读(1899) 评论(0) 推荐(0) 编辑
摘要: 1,openssl下载地址:http://slproweb.com/products/Win32OpenSSL.html 2,openssl安装后配置好环境变量 3,openssl创建证书 打开cmd$>openssl genrsa -out private-key.pem 1024 ##创建根证书 阅读全文
posted @ 2021-02-24 10:00 元点 阅读(846) 评论(0) 推荐(0) 编辑
摘要: 针对证书私钥采用SHA256算法对数据进行签名时,报“指定的算法无效”这一异常, 实际原因是RSACryptoServiceProvider依赖底层CryptoAPI来完成其工作,只有CrytoAPI支持SHA256算法的Windows版本才会启用此功能,这意味着它取决于我们用来执行加密操作的CSP 阅读全文
posted @ 2021-02-24 09:32 元点 阅读(1032) 评论(0) 推荐(0) 编辑