chachapoly: fix big-endian check for cross-browser support. fixes #100.

This commit is contained in:
Christopher Jeffrey 2016-11-09 18:07:52 -08:00
parent 53de684b4a
commit 60a4c0a34d
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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)