Code refactoring

This commit is contained in:
RainLoop Team 2015-04-06 23:32:19 +04:00
parent ffde4f03a8
commit b7709c8117
21 changed files with 291 additions and 192 deletions

View file

@ -61,11 +61,17 @@
this.submitRequest(true);
_.delay(function () {
mKeyPair = PgpStore.openpgp.generateKeyPair({
'userId': sUserID,
'numBits': Utils.pInt(self.keyBitLength()),
'passphrase': Utils.trim(self.password())
});
mKeyPair = false;
try {
mKeyPair = PgpStore.openpgp.generateKeyPair({
'userId': sUserID,
'numBits': Utils.pInt(self.keyBitLength()),
'passphrase': Utils.trim(self.password())
});
} catch (e) {
// window.console.log(e);
}
if (mKeyPair && mKeyPair.privateKeyArmored)
{
@ -78,6 +84,7 @@
}
self.submitRequest(false);
}, 100);
return true;