Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var CipherBase = require('../');

var test = require('tape');
var inherits = require('inherits');
const os = require('os');

test('basic version', function (t) {
function Cipher() {
Expand Down Expand Up @@ -212,7 +213,11 @@ test('handle UInt16Array', function (t) {
if (ArrayBuffer.isView && (Buffer.prototype instanceof Uint8Array || Buffer.TYPED_ARRAY_SUPPORT)) {
var cipher = new Cipher();
var final = cipher.update(new Uint16Array([1234, 512])).finalName('hex');
t.equals(final, 'd2040002');
if ( os.endianness() === "BE") {
t.equals(final, '04d20200');
} else {
t.equals(final, 'd2040002');
}
} else {
t.skip('ArrayBuffer.isView and/or TypedArray not fully supported');
}
Expand Down