Crypto Edge
    Preparing search index...

    Function toBytes

    • Encode a UTF-8 string to bytes. Uses the global TextEncoder.

      Parameters

      • input: string | Uint8Array<ArrayBufferLike>

      Returns Uint8Array

      import { toBytes } from "@aspect/crypto-edge";

      const bytes = toBytes("hello world");
      // Uint8Array of UTF-8 encoded bytes