2021年6月24日

摘要: exec sp_addsrvrolemember '计算机名字\Administrator', 'sysadmin' 一般到这一步就行了 如果还是不行就走下面这一步: sp_addsrvrolemember 'windows身份登录的登录名', 'sysadmin' 如果出现“无法启动xxxxx,未 阅读全文
posted @ 2021-06-24 15:51 炼金师 阅读(994) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Text; /// <summary> /// 数据库工具 /// </summa 阅读全文
posted @ 2021-06-24 08:37 炼金师 阅读(468) 评论(2) 推荐(0)

2021年6月22日

摘要: /// <summary> /// 字节数组转换为Hex字符串 /// </summary> /// <param name="data"></param> /// <param name="toLowerCase"></param> /// <returns></returns> private 阅读全文
posted @ 2021-06-22 15:26 炼金师 阅读(960) 评论(0) 推荐(0)
摘要: /// <summary> /// hmacsha256加密 /// </summary> /// <param name="message">内容</param> /// <param name="secret">密钥</param> /// <param name="encoding">你懂的< 阅读全文
posted @ 2021-06-22 15:23 炼金师 阅读(1124) 评论(0) 推荐(0)

2021年5月4日

摘要: using System; using System.Collections.Generic; using System.IO; using System.Text; /// <summary> /// 打印error类 /// </summary> public class LogUtil { p 阅读全文
posted @ 2021-05-04 12:12 炼金师 阅读(414) 评论(0) 推荐(0)

2021年4月16日

摘要: 1.从证书提取私钥、公钥 假如证书名字为"ttt.pfx" 私钥提取:pkcs12 -in 文件名.pfx -nocerts -nodes 如果有密码,就会提示输入密码(注意密码输入是看不到的) 公钥提取:x509 -in 文件名.cer -pubkey -noout 2.用openssl生成rsa 阅读全文
posted @ 2021-04-16 13:16 炼金师 阅读(834) 评论(0) 推荐(0)

2021年2月5日

摘要: using System; using System.IO; using System.Net; using System.Net.Security; using System.Security.Cryptography.X509Certificates; using System.Text; us 阅读全文
posted @ 2021-02-05 10:35 炼金师 阅读(1202) 评论(0) 推荐(0)

2021年1月18日

摘要: 注意,仅适用于某一系统内,思路是用ascill码去累加,累加到一定次数重置,使用时需配合datetime去拼接,这样可以达到理论上就算在同一时间内同时触发,也能保证生成的码不重复。 下面直接贴代码。 using System; using System.IO; /// <summary> /// 生 阅读全文
posted @ 2021-01-18 15:48 炼金师 阅读(99) 评论(0) 推荐(0)

2020年12月11日

摘要: /// <summary> /// Escape方法 /// </summary> /// <param name="s"></param> /// <returns></returns> public static string Escape(string s) { StringBuilder s 阅读全文
posted @ 2020-12-11 16:07 炼金师 阅读(143) 评论(0) 推荐(0)
摘要: string test = "小飞侠"; test = HttpUtility.UrlEncode(test, Encoding.UTF8);//编码 test = HttpUtility.UrlDecode(test, Encoding.UTF8);//解码 阅读全文
posted @ 2020-12-11 15:28 炼金师 阅读(255) 评论(0) 推荐(0)

导航