15 lines
401 B
JavaScript
15 lines
401 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Random = void 0;
|
|
class Random {
|
|
/**
|
|
* Returns `count` cryptographically secure random bytes
|
|
*/
|
|
static getBytes(count) {
|
|
const out = new Uint8Array(count);
|
|
globalThis.crypto.getRandomValues(out);
|
|
return out;
|
|
}
|
|
}
|
|
exports.Random = Random;
|
|
//# sourceMappingURL=random.js.map
|