From: Chris Duncan Date: Fri, 9 Oct 2026 18:44:45 +0000 (-0700) Subject: Fix documentation of byte normalization. X-Git-Tag: v2.0.0~1^2~55 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=32cea8f57f5030030d463411caabdbc45f7237ed;p=nano25519.git Fix documentation of byte normalization. --- diff --git a/README.md b/README.md index fa0c75f..db48a0a 100644 --- a/README.md +++ b/README.md @@ -64,11 +64,12 @@ import * as nano25519 from "nano25519"; ## Usage -Each primitive implementation is synchronous. Inputs can be passed as Uint8Array -byte arrays, ArrayBuffers, or hexadecimal strings; `derive()` and `sign()` -return a hexadecimal string. To receive bytes instead, pass a preallocated -output buffer as an additional optional argument; the result bytes are written -into it directly, and the return value is `undefined` instead of a string. +Each primitive implementation is synchronous. Inputs can be passed as byte +arrays using `Uint8Array` or as hexadecimal strings. `derive()` and +`sign()` return the public key or signature respectively as a hexadecimal +string. To receive bytes instead, pass a preallocated output buffer as an +additional optional argument; the result bytes are written into it directly, and +the return value is `undefined` instead of a string. ### Derive (bytes) diff --git a/src/lib/primordials.ts b/src/lib/primordials.ts index bbfc930..7cf991d 100644 --- a/src/lib/primordials.ts +++ b/src/lib/primordials.ts @@ -190,7 +190,7 @@ function hexToBytes (hex: string): Bytes { } /** * Accepts an unknown input; checks that it is a representation of bytes using a - * hex string, ArrayBuffer, or Uint8Array; and validates that the byte length of + * hex string or Uint8Array; and validates that the byte length of * the value is within a specified range. * * @param {string} name Name of variable to be validated