Skip to content

Commit

Permalink
fix ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
foxt committed Dec 19, 2024
1 parent 7d682fd commit ff356c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/auth/iCSRPAuthenticator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export class GSASRPAuthenticator {


private async derivePassword(protocol: "s2k" | "s2k_fo", password: string, salt: Uint8Array, iterations: number) {
let passHash = new Uint8Array(await util.hash(srp.h, stringToU8Array(password).buffer as ArrayBuffer));
let passHash: Uint8Array = new Uint8Array(await util.hash(srp.h, stringToU8Array(password).buffer as ArrayBuffer));
if (protocol == "s2k_fo")
passHash = stringToU8Array(util.toHex(passHash)) as Uint8Array<ArrayBuffer>;
passHash = stringToU8Array(util.toHex(passHash));


const imported = await crypto.subtle.importKey(
Expand Down

0 comments on commit ff356c3

Please sign in to comment.