Rap 原分销系统代码Web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139040fe43bf50c77520e6078168a171c2964a86.svn-base 472B

5 kuukautta sitten
1234567891011121314
  1. import JSEncrypt from 'jsencrypt/bin/jsencrypt.min'
  2. // 密钥对生成 http://web.chacuo.net/netrsakeypair
  3. const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD\n' +
  4. '2iRe41HdTNF8RUhNnHit5NpMNtGL0NPTSSpPjjI1kJfVorRvaQerUgkCAwEAAQ=='
  5. // 加密
  6. export function encrypt(txt) {
  7. const encryptor = new JSEncrypt()
  8. encryptor.setPublicKey(publicKey) // 设置公钥
  9. return encryptor.encrypt(txt) // 对需要加密的数据进行加密
  10. }