1
0
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:
Kyle Spearrin
2017-10-13 17:07:20 -04:00
parent 294817d17b
commit 2b5915b257
15 changed files with 526 additions and 527 deletions

View File

@@ -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) {