mirror of
https://github.com/bitwarden/browser
synced 2024-12-27 02:14:24 +01:00
formatting fixes
This commit is contained in:
parent
95cd9153c9
commit
5608f11925
@ -4,8 +4,7 @@ import { CryptoService } from '../abstractions/crypto.service';
|
||||
const PwnedPasswordsApi = 'https://api.pwnedpasswords.com/range/';
|
||||
|
||||
export class AuditService implements AuditServiceAbstraction {
|
||||
constructor(private cryptoService: CryptoService) {
|
||||
}
|
||||
constructor(private cryptoService: CryptoService) { }
|
||||
|
||||
async passwordLeaked(password: string): Promise<number> {
|
||||
const hash = (await this.cryptoService.sha1(password)).toUpperCase();
|
||||
|
@ -454,7 +454,7 @@ export class CryptoService implements CryptoServiceAbstraction {
|
||||
|
||||
async sha1(password: string): Promise<string> {
|
||||
const passwordArr = UtilsService.fromUtf8ToArray(password);
|
||||
const hash = await Crypto.subtle.digest({ name: 'SHA-1' }, passwordArr);
|
||||
const hash = await Subtle.digest({ name: 'SHA-1' }, passwordArr);
|
||||
return UtilsService.fromBufferToHex(hash);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user