1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

abstract password generation service

This commit is contained in:
Kyle Spearrin
2018-01-29 17:59:57 -05:00
parent e160b97497
commit 15f254879f
4 changed files with 15 additions and 18 deletions

View File

@@ -5,7 +5,7 @@ import { UtilsService } from './utils.service';
import { CryptoService } from '../abstractions/crypto.service';
import {
PasswordGenerationService as PasswordGenerationServiceInterface,
PasswordGenerationService as PasswordGenerationServiceAbstraction,
} from '../abstractions/passwordGeneration.service';
import { StorageService } from '../abstractions/storage.service';
@@ -29,7 +29,7 @@ const Keys = {
const MaxPasswordsInHistory = 100;
export class PasswordGenerationService implements PasswordGenerationServiceInterface {
export class PasswordGenerationService implements PasswordGenerationServiceAbstraction {
static generatePassword(options: any): string {
// overload defaults with given options
const o = Object.assign({}, DefaultOptions, options);
@@ -147,8 +147,8 @@ export class PasswordGenerationService implements PasswordGenerationServiceInter
return password;
}
optionsCache: any;
history: PasswordHistory[] = [];
private optionsCache: any;
private history: PasswordHistory[] = [];
constructor(private cryptoService: CryptoService, private storageService: StorageService) {
}