#HarmonyOS NEXT体验官# 数据加密 4.加解密之二
原创
javascriptimportcryptoFrameworkfrom'ohos.security.cryptoFramework';importbufferfrom'ohos.buffer';functiongenIvParamsSpec(){letarr[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];16bytesletdataIvnewUint8Array(arr);letivBlob:cryptoFramework.DataBlob{data:dataIv};letivParamsSpec:cryptoFramework.IvParamsSpec{algName:"IvParamsSpec",iv:ivBlob};returnivParamsSpec;}加密消息asyncfunctionencryptMessagePromise(symKey:cr...