function textToBytes
textToBytes(text: string): Uint8Array

Text to array buffer, needed for crypto operations. The text is encoded in UTF-8, which is the default for the WebCrypto API.

Parameters

text: string

Return Type

Usage

import { textToBytes } from "lib/utils.ts";