Skip to content

Commit

Permalink
minor: sm2加密方式生成的密文增加前缀
Browse files Browse the repository at this point in the history
  • Loading branch information
luofann committed Aug 24, 2023
1 parent e47c532 commit 07def5e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
const pkey = cryptoJsSdk.helper.asn1.decode(pubKey)
const cipher = sm2.encrypt(pkey, cryptoJsSdk.helper.encode.strToHex(this.localVal.value))
const base64Ret = cryptoJsSdk.helper.encode.hexToBase64(cipher)
return base64Ret
return `${this.ASYMMETRIC_PREFIX}${base64Ret}`
}
},
change () {
Expand Down

0 comments on commit 07def5e

Please sign in to comment.