function randomPresharedKeyBytes
randomPresharedKeyBytes(): Uint8Array

Generates random preshared key bytes.

Useful for generating preshared keys.

Examples

Generate preshared key bytes

import { assertEquals } from "@std/assert";
import { randomPresharedKeyBytes } from "@hertzg/wg-keys";

assertEquals(randomPresharedKeyBytes().length, 32);

Return Type

preshared key bytes

Usage

import { randomPresharedKeyBytes } from ".";