1'use strict'; 2const common = require('../common'); 3if (!common.hasCrypto) 4 common.skip('missing crypto'); 5 6const { randomFillSync } = require('crypto'); 7const { notStrictEqual } = require('assert'); 8 9const ab = new ArrayBuffer(20); 10const buf = Buffer.from(ab, 10); 11 12const before = buf.toString('hex'); 13 14randomFillSync(buf); 15 16const after = buf.toString('hex'); 17 18notStrictEqual(before, after); 19