fix: switch to using utf8ToBytes
This commit is contained in:
parent
3e4fc635b1
commit
37fd7543af
|
@ -26,6 +26,7 @@ import {
|
||||||
PubkeyChallengeResponse,
|
PubkeyChallengeResponse,
|
||||||
} from "./responses/auth.js";
|
} from "./responses/auth.js";
|
||||||
import isNode from "detect-node";
|
import isNode from "detect-node";
|
||||||
|
import { utf8ToBytes } from "@noble/curves/abstract/utils";
|
||||||
|
|
||||||
type NodeReadableStreamType = typeof import("stream").Readable;
|
type NodeReadableStreamType = typeof import("stream").Readable;
|
||||||
|
|
||||||
|
@ -148,7 +149,7 @@ export class Client {
|
||||||
);
|
);
|
||||||
|
|
||||||
const signature = ed.sign(
|
const signature = ed.sign(
|
||||||
new TextEncoder().encode(challenge.challenge),
|
utf8ToBytes(challenge.challenge),
|
||||||
this._options.privateKey,
|
this._options.privateKey,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue