mirror of
https://github.com/bitwarden/browser
synced 2026-02-26 17:43:22 +00:00
[PM-31406] fix: TypeScript 5.9 type compatibility fixes for audit.service (#19195)
* fix: TypeScript 5.9 type compatibility fixes for audit.service Add explicit `as BufferSource` casts and `Uint8Array` wrapping to satisfy stricter type checking in TypeScript 5.9. Non-functional changes. * Add non-null assertion
This commit is contained in:
@@ -55,7 +55,7 @@ export class AuditService implements AuditServiceAbstraction {
|
||||
*/
|
||||
protected async fetchLeakedPasswordCount(password: string): Promise<number> {
|
||||
const hashBytes = await this.cryptoFunctionService.hash(password, "sha1");
|
||||
const hash = Utils.fromBufferToHex(hashBytes).toUpperCase();
|
||||
const hash = Utils.fromArrayToHex(hashBytes)!.toUpperCase();
|
||||
const hashStart = hash.substr(0, 5);
|
||||
const hashEnding = hash.substr(5);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user