nuevos datos de operador

This commit is contained in:
xXpuma99Xx
2022-07-12 16:20:54 -05:00
parent 7ee7ef616b
commit 64b6258506
9 changed files with 110 additions and 19 deletions
+12
View File
@@ -17,4 +17,16 @@ export class BcryptService {
return bcrypt.hashSync(password, salt);
}
generarPassword = () => {
const length = 8;
const charset =
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
const n = charset.length;
let password = '';
for (let i = 0; i < length; i++)
password += charset.charAt(Math.floor(Math.random() * n));
return password;
};
}