|
@@ -1,5 +1,5 @@
|
|
|
import JSEncrypt from 'jsencrypt'
|
|
import JSEncrypt from 'jsencrypt'
|
|
|
-import jsMd5 from 'js-md5'
|
|
|
|
|
|
|
+import { md5 } from 'js-md5'
|
|
|
// 密钥对生成 http://web.chacuo.net/netrsakeypair
|
|
// 密钥对生成 http://web.chacuo.net/netrsakeypair
|
|
|
|
|
|
|
|
const publicKey =
|
|
const publicKey =
|
|
@@ -32,5 +32,5 @@ export const decrypt = (txt: string) => {
|
|
|
// MD5加密并返回
|
|
// MD5加密并返回
|
|
|
const md5Key = '876456'
|
|
const md5Key = '876456'
|
|
|
export const md5Encrypt = (txt: string) => {
|
|
export const md5Encrypt = (txt: string) => {
|
|
|
- return jsMd5(txt + md5Key)
|
|
|
|
|
|
|
+ return md5(txt + md5Key)
|
|
|
}
|
|
}
|