8 lines
199 B
TypeScript
8 lines
199 B
TypeScript
import crypto from 'crypto';
|
|
import { Bytes } from '../src/crypto/bytes.js';
|
|
|
|
const rng = crypto.getRandomValues(new Uint8Array(2048));
|
|
const bytes = Bytes.from(rng);
|
|
|
|
console.log(bytes.toBase64());
|