From 60a4c0a34d3c4cf20bb2694fc4b4aaa45e1f82d0 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 9 Nov 2016 18:07:52 -0800 Subject: [PATCH] chachapoly: fix big-endian check for cross-browser support. fixes #100. --- lib/crypto/chachapoly.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crypto/chachapoly.js b/lib/crypto/chachapoly.js index e3b2d57d..5fa19207 100644 --- a/lib/crypto/chachapoly.js +++ b/lib/crypto/chachapoly.js @@ -9,7 +9,7 @@ var assert = require('assert'); var native = require('../utils/native'); -var BIG_ENDIAN = new Int8Array(Int16Array.of(1).buffer)[0] === 0; +var BIG_ENDIAN = new Int8Array(new Int16Array([1]).buffer)[0] === 0; /** * ChaCha20 (used for bip151)