File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ var CipherBase = require('../');
5
5
6
6
var test = require ( 'tape' ) ;
7
7
var inherits = require ( 'inherits' ) ;
8
+ const os = require ( 'os' ) ;
8
9
9
10
test ( 'basic version' , function ( t ) {
10
11
function Cipher ( ) {
@@ -212,7 +213,11 @@ test('handle UInt16Array', function (t) {
212
213
if ( ArrayBuffer . isView && ( Buffer . prototype instanceof Uint8Array || Buffer . TYPED_ARRAY_SUPPORT ) ) {
213
214
var cipher = new Cipher ( ) ;
214
215
var final = cipher . update ( new Uint16Array ( [ 1234 , 512 ] ) ) . finalName ( 'hex' ) ;
215
- t . equals ( final , 'd2040002' ) ;
216
+ if ( os . endianness ( ) === "BE" ) {
217
+ t . equals ( final , '04d20200' ) ;
218
+ } else {
219
+ t . equals ( final , 'd2040002' ) ;
220
+ }
216
221
} else {
217
222
t . skip ( 'ArrayBuffer.isView and/or TypedArray not fully supported' ) ;
218
223
}
You can’t perform that action at this time.
0 commit comments