nuevos datos de operador
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user