Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/simple_utility/src/crypto.ts>randomBin

Useful snippet collection.
Go to Latest
function randomBin
import { randomBin } from "https://deno.land/x/simple_utility@v1.2.1/src/crypto.ts";

Generate random binary with any number of bytes.

Examples

Example 1

const random = randomBin(16);

Parameters

n: number

Returns

Uint8Array