formatting fixes

This commit is contained in:
Kyle Spearrin 2018-04-13 23:55:07 -04:00
parent 95cd9153c9
commit 5608f11925
2 changed files with 2 additions and 3 deletions

View File

@ -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();

View File

@ -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);
}