From 2968488278e5e88b7f0b1359034180f643177f59 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 16 Dec 2016 15:18:06 +0100 Subject: [PATCH] convert uint8 arrays to hex --- www/common/cryptpad-common.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 882ae2656..0f3ff4e9a 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -240,6 +240,12 @@ define([ return secret; }; + var uint8ArrayToHex = common.uint8ArrayToHex = function (a) { + return a.map(function (e) { + return Number(e & 0xff).toString(16); + }).join(''); + }; + var replaceHash = common.replaceHash = function (hash) { if (window.history && window.history.replaceState) { if (!/^#/.test(hash)) { hash = '#' + hash; }