2018-06-13 15:39:39 -04:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import { arrayify } from './convert';
|
|
|
|
|
2018-06-15 04:18:17 -04:00
|
|
|
import { randomBytes as _randomBytes } from 'crypto';
|
2018-06-13 15:39:39 -04:00
|
|
|
|
2018-06-15 04:18:17 -04:00
|
|
|
//function _randomBytes(length) { return "0x00"; }
|
2018-06-13 15:39:39 -04:00
|
|
|
|
2018-06-15 04:18:17 -04:00
|
|
|
export function randomBytes(length: number): Uint8Array {
|
|
|
|
return arrayify(_randomBytes(length));
|
|
|
|
}
|
2018-06-13 15:39:39 -04:00
|
|
|
|