initital commit
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
|
||||
// import JSEncrypt from '../jsencrypt/jsencrypt'
|
||||
// import JSEncrypt from '../jsencrypt/jsencryptInit'
|
||||
import JSEncrypt from '../jsencrypt/jsencryptInit'
|
||||
export function encrypt(publicKey, message) {
|
||||
const encrypt = new JSEncrypt()
|
||||
encrypt.setPublicKey(publicKey) // publicKey为公钥
|
||||
return encrypt.encrypt(message)
|
||||
}
|
||||
Reference in New Issue
Block a user