fix: switch to using utf8ToBytes

This commit is contained in:
Derrick Hammer 2023-07-18 09:34:26 -04:00
parent 3e4fc635b1
commit 37fd7543af
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@ import {
PubkeyChallengeResponse,
} from "./responses/auth.js";
import isNode from "detect-node";
import { utf8ToBytes } from "@noble/curves/abstract/utils";
type NodeReadableStreamType = typeof import("stream").Readable;
@ -148,7 +149,7 @@ export class Client {
);
const signature = ed.sign(
new TextEncoder().encode(challenge.challenge),
utf8ToBytes(challenge.challenge),
this._options.privateKey,
);