swc/bundler/tests/.cache/untrusted/35fdd53761b52373b1b3937056a38939fb407824.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

11 lines
279 B
TypeScript

// Loaded from https://raw.githubusercontent.com/aricart/tweetnacl-deno/import-type-fixes/src/random.ts
import { ByteArray } from './array.ts';
export function randomBytes(n: number): ByteArray {
let b = ByteArray(n);
window.crypto.getRandomValues(b);
return b;
}