随笔分类 -  JAVA

摘要:Mono mono1 = (Mono) createUnsafeWebClient().post() .uri(path) .contentType(MediaType.MULTIPART_FORM_DATA) .header("Accept", "text/event-stream") .body 阅读全文
posted @ 2025-05-19 10:22 筱老邪 阅读(3) 评论(0) 推荐(0)
摘要:方法一: response.setContentType("image/png");// try {// // 步骤 1:创建 URL 对象// URL url = new URL(imageUrl);//// // 步骤 2:打开连接// HttpURLConnection connection 阅读全文
posted @ 2025-05-19 10:21 筱老邪 阅读(27) 评论(0) 推荐(0)
摘要:public static String toBase64String(String value) throws UnsupportedEncodingException { if (value == null || value.isEmpty()) { return ""; } byte[] by 阅读全文
posted @ 2025-05-19 10:16 筱老邪 阅读(8) 评论(0) 推荐(0)
摘要:java: 1 public static void main(String[] args) throws NoSuchAlgorithmException { 2 String token = "31a4a1aa-cffc-4aca-9ef6-0497edf7fbed"; 3 String non 阅读全文
posted @ 2023-07-28 09:40 筱老邪 阅读(432) 评论(0) 推荐(0)
摘要:C# 需要引用System.Security.Cryptography命名空间 1 /// <summary>AES加密</summary> 2 3 /// <param name="text">明文</param> 4 /// <param name="key">密钥,长度为16的字符串</par 阅读全文
posted @ 2023-07-27 18:19 筱老邪 阅读(565) 评论(0) 推荐(0)
摘要:Java版本: public void testHash() { String password = "Test"; byte[] key = password.getBytes(); MessageDigest md = MessageDigest.getInstance("SHA-1"); by 阅读全文
posted @ 2023-07-27 18:16 筱老邪 阅读(145) 评论(0) 推荐(0)