From 22fbc7e5d81e9c18dee04d2bdeded6690c513f7b Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 10 Jul 2017 09:21:27 +0200 Subject: [PATCH] implement getter for public keys --- www/common/cryptpad-common.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 04a04401d..1b3c346bd 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -328,6 +328,15 @@ define([ typeof(proxy.curvePublic) === 'string'; }; + common.getPublicKeys = function (proxy) { + proxy = proxy || common.getProxy(); + if (!proxy || !proxy.edPublic || !proxy.curvePublic) { return; } + return { + curve: proxy.curvePublic, + ed: proxy.edPublic, + }; + }; + common.isArray = $.isArray; /*