mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
convert to promises. loginService cipher refactor
This commit is contained in:
@@ -336,21 +336,15 @@ function initCryptoService(constantsService) {
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
CryptoService.prototype.clearKeys = function (callback) {
|
||||
if (!callback || typeof callback !== 'function') {
|
||||
throw 'callback function required';
|
||||
}
|
||||
|
||||
CryptoService.prototype.clearKeys = function () {
|
||||
var self = this;
|
||||
Q.all([
|
||||
return Q.all([
|
||||
self.clearKey(),
|
||||
self.clearKeyHash(),
|
||||
self.clearOrgKeys(),
|
||||
self.clearEncKey(),
|
||||
self.clearPrivateKey()
|
||||
]).then(function () {
|
||||
callback();
|
||||
});
|
||||
]);
|
||||
};
|
||||
|
||||
CryptoService.prototype.toggleKey = function (callback) {
|
||||
|
||||
Reference in New Issue
Block a user