get rid of pubkey warnings

This commit is contained in:
Ryan Tharp 2020-08-17 04:02:02 +00:00
parent 3cee372d5c
commit 8e32879795
2 changed files with 6 additions and 0 deletions

View File

@ -71,6 +71,9 @@ const DHDecrypt64 = async (symmetricKey, cipherText64) => {
}
function makeSymmetricKey(privKey, pubKey) {
if (pubKey.byteLength === 32) {
pubKey = Buffer.concat([Buffer.from('05', 'hex'), pubKey])
}
const keyAgreement = libsignal.curve.calculateAgreement(
pubKey,
privKey,

View File

@ -71,6 +71,9 @@ const DHDecrypt64 = async (symmetricKey, cipherText64) => {
}
function makeSymmetricKey(privKey, pubKey) {
if (pubKey.byteLength === 32) {
pubKey = Buffer.concat([Buffer.from('05', 'hex'), pubKey])
}
const keyAgreement = libsignal.curve.calculateAgreement(
pubKey,
privKey,