fix excess whitespace, fix new DataView

This commit is contained in:
ZaneHannanAU
2018-06-20 19:03:33 +10:00
committed by GitHub
parent 952cb6b4dd
commit da64ac90bb
+4 -5
View File
@@ -1200,10 +1200,10 @@ namespace crypto_tests {
{
// crypto_timingsafeequal_dataview_test
let dv1: DataView = DataView(Uint8Array.of(1, 2, 3, 4, 5));
let dv2: DataView = DataView(Int8Array.of(1, 2, 3, 4, 5));
let dv3: DataView = DataView(Buffer.of(5, 4, 3, 2, 1));
let dv4: DataView = DataView(Uint8ClampedArray.of(5, 4, 3, 2, 1));
let dv1: DataView = new DataView(Uint8Array.of(1, 2, 3, 4, 5));
let dv2: DataView = new DataView(Int8Array.of(1, 2, 3, 4, 5));
let dv3: DataView = new DataView(Buffer.of(5, 4, 3, 2, 1));
let dv4: DataView = new DataView(Uint8ClampedArray.of(5, 4, 3, 2, 1));
assert(crypto.timingSafeEqual(dv1, dv2));
assert(!crypto.timingSafeEqual(dv1, dv3));
@@ -1242,7 +1242,6 @@ namespace crypto_tests {
crypto.randomFill(arr, 2, (err: Error, buf: ArrayBufferView) => void {});
crypto.randomFill(arr, 2, 3, (err: Error, buf: ArrayBufferView) => void {});
// crypto_randomfill_int32array_test
let arr: Int32Array = new Int32Array(10);
crypto.randomFillSync(arr);