mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
* Initial commit for length sanitization * Updated sanitize function * Updated type instantiation Co-authored-by: Vincent Salucci <vsalucci@bitwarden.com>
17 lines
1002 B
TypeScript
17 lines
1002 B
TypeScript
import { GeneratedPasswordHistory } from '../models/domain/generatedPasswordHistory';
|
|
import { PasswordGeneratorPolicyOptions } from '../models/domain/passwordGeneratorPolicyOptions';
|
|
|
|
export abstract class PasswordGenerationService {
|
|
generatePassword: (options: any) => Promise<string>;
|
|
generatePassphrase: (options: any) => Promise<string>;
|
|
getOptions: () => Promise<[any, PasswordGeneratorPolicyOptions]>;
|
|
enforcePasswordGeneratorPoliciesOnOptions: (options: any) => Promise<[any, PasswordGeneratorPolicyOptions]>;
|
|
getPasswordGeneratorPolicyOptions: () => Promise<PasswordGeneratorPolicyOptions>;
|
|
saveOptions: (options: any) => Promise<any>;
|
|
getHistory: () => Promise<GeneratedPasswordHistory[]>;
|
|
addHistory: (password: string) => Promise<any>;
|
|
clear: () => Promise<any>;
|
|
passwordStrength: (password: string, userInputs?: string[]) => zxcvbn.ZXCVBNResult;
|
|
normalizeOptions: (options: any, enforcedPolicyOptions: PasswordGeneratorPolicyOptions) => void;
|
|
}
|