mirror of
https://github.com/bitwarden/browser
synced 2025-01-06 15:38:42 +01:00
21 lines
1.0 KiB
TypeScript
21 lines
1.0 KiB
TypeScript
import * as zxcvbn from "zxcvbn";
|
|
|
|
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: (userId?: string) => Promise<any>;
|
|
passwordStrength: (password: string, userInputs?: string[]) => zxcvbn.ZXCVBNResult;
|
|
normalizeOptions: (options: any, enforcedPolicyOptions: PasswordGeneratorPolicyOptions) => void;
|
|
}
|