mirror of
https://github.com/bitwarden/web
synced 2025-12-14 15:23:14 +00:00
move pbkdf2 to web crypto with shim fallback
This commit is contained in:
@@ -13,10 +13,11 @@ angular
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var key = cryptoService.makeKey(value, profile.email);
|
||||
var valid = key.keyB64 === cryptoService.getKey().keyB64;
|
||||
ngModel.$setValidity('masterPassword', valid);
|
||||
return valid ? value : undefined;
|
||||
return cryptoService.makeKey(value, profile.email).then(function (result) {
|
||||
var valid = result.keyB64 === cryptoService.getKey().keyB64;
|
||||
ngModel.$setValidity('masterPassword', valid);
|
||||
return valid ? value : undefined;
|
||||
});
|
||||
});
|
||||
|
||||
// For model -> DOM validation
|
||||
@@ -25,11 +26,11 @@ angular
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var key = cryptoService.makeKey(value, profile.email);
|
||||
var valid = key.keyB64 === cryptoService.getKey().keyB64;
|
||||
|
||||
ngModel.$setValidity('masterPassword', valid);
|
||||
return value;
|
||||
return cryptoService.makeKey(value, profile.email).then(function (result) {
|
||||
var valid = result.keyB64 === cryptoService.getKey().keyB64;
|
||||
ngModel.$setValidity('masterPassword', valid);
|
||||
return value;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user