From 9fb2af4d33a53b33bd11442085f51e4a965fd6cb Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Mon, 13 Dec 2021 08:22:04 -0400 Subject: [PATCH] Typing for key pair --- utils/ECC/ECC.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/ECC/ECC.js b/utils/ECC/ECC.js index c06d7b08..7500fe94 100644 --- a/utils/ECC/ECC.js +++ b/utils/ECC/ECC.js @@ -35,10 +35,19 @@ const isEncryptedMessage = message => message.mac && message.ephemPublicKey +/** + * @typedef {object} Pair + * @prop {Buffer} privateKey + * @prop {Buffer} publicKey + * @prop {string} privateKeyBase64 + * @prop {string} publicKeyBase64 + */ + /** * Generates a new encryption key pair that will be used * when communicating with the deviceId specified * @param {string} deviceId + * @returns {Pair} */ const generateKeyPair = deviceId => { try {