This commit is contained in:
2025-08-26 16:17:24 +08:00
commit e3d080e419
557 changed files with 70994 additions and 0 deletions

12
common/jsencrypt.js Normal file
View File

@@ -0,0 +1,12 @@
import JSEncrypt from './jsencrypt.min'
// 密钥对生成 http://web.chacuo.net/netrsakeypair
const publicKey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXgKEE1zA47xfCqZ451FfkRMVj610bolAoorFpRv9KOjwFN3l9rG1IX2rhiftHsuKXJPMhGnkxxUAVq5iWfuKz1uWKkz6yL3rbOy3yv90FEUbHY/YY29pSkaS0avR0+9gLxq0a4s7MiD96jFat2Bz6rvHUWT3v309XyXps6RwEAwIDAQAB'
// 加密
export function encrypt(txt) {
const encryptor = new JSEncrypt()
encryptor.setPublicKey(publicKey) // 设置公钥
return encryptor.encrypt(txt) // 对数据进行加密
}