Skip to content

Instantly share code, notes, and snippets.

@JasonGrass
JasonGrass / install_fonts.bat
Created August 23, 2024 09:10
Windows 批量安装当前文件夹中的所有字体
@echo off
setlocal enabledelayedexpansion
REM 获取当前脚本文件所在的目录
set scriptDir=%~dp0
REM 字体目录
set fontDir=%windir%\Fonts
REM 遍历当前目录的所有 .ttf 文件
@JasonGrass
JasonGrass / RsaMd5Demo.java
Created April 27, 2022 04:21
JAVA MD5withRSA 签名验证示例代码
package com.third.demo.test;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
@JasonGrass
JasonGrass / .NET_RsaEncryptProvider.cs
Last active May 12, 2022 06:46
RSA 加密解密
using System;
using System.Security.Cryptography;
using System.Text;
/// <summary>
/// RSA 加密解密辅助类
/// 需要使用 XML 格式的公私钥,可以借助 .Net 5 的 RSACryptoServiceProvider 类,将其他格式的 Key 预先转换为 XML 格式
/// </summary>
public class RsaEncryptProvider
{