Skip to content

Commit

Permalink
fix: Error on ECDH public key importing
Browse files Browse the repository at this point in the history
  • Loading branch information
microshine committed Oct 28, 2021
1 parent 699ac6e commit 2908fbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/HowToEncryptCMSviaKey/es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function envelopedEncryptInternal()
.then(() => {
//region Import public key
const algorithm = getKeyAgreeAlgorithmParams("importkey");
return crypto.importKey("spki", publicKeyBuffer, algorithm.algorithm, true, algorithm.usages);
return crypto.importKey("spki", publicKeyBuffer, algorithm.algorithm, true, []);
//endregion
})
.then((publicKey) => {
Expand Down

0 comments on commit 2908fbb

Please sign in to comment.