aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/Keyring.js
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-08-17 14:57:41 +0000
committerMaximilian Krambach <[email protected]>2018-08-17 14:57:41 +0000
commitad39d54d192864b54a155bf5f94d5b6bb3e8612a (patch)
treed10d1944bcffea2b27e569a7836cb2e5fcff1b32 /lang/js/src/Keyring.js
parentjs: disallow bulk set data on key from outside (diff)
downloadgpgme-ad39d54d192864b54a155bf5f94d5b6bb3e8612a.tar.gz
gpgme-ad39d54d192864b54a155bf5f94d5b6bb3e8612a.zip
js: removed Key.armor property in synchronous use
-- * src/Key.js The synchronous mode for a Key does not offer an armor/ armored property anymore. This frees up a lot of performance issues, also the armored expoort is expected to change quite often, so a cached version is not advisable. * hasSecret/getHasSecret is now refactored, to reflect their uses. With get('hasSecret') there is a method that fetches the result. * src/Key.js also some refactoring
Diffstat (limited to 'lang/js/src/Keyring.js')
-rw-r--r--lang/js/src/Keyring.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/lang/js/src/Keyring.js b/lang/js/src/Keyring.js
index 43ab96c8..766bab15 100644
--- a/lang/js/src/Keyring.js
+++ b/lang/js/src/Keyring.js
@@ -38,12 +38,11 @@ export class GPGME_Keyring {
*
* @param {String | Array<String>} pattern (optional) A pattern to
* search for in userIds or KeyIds.
- * @param {Boolean} prepare_sync (optional) if set to true, the
- * 'hasSecret' and 'armored' properties will be fetched for the Keys as
- * well. These require additional calls to gnupg, resulting in a
- * performance hungry operation. Calling them here enables direct,
- * synchronous use of these properties for all keys, without having to
- * resort to a refresh() first.
+ * @param {Boolean} prepare_sync (optional) if set to true, most data
+ * (with the exception of armored Key blocks) will be cached for the
+ * Keys. This enables direct, synchronous use of these properties for
+ * all keys. It does not check for changes on the backend. The cached
+ * information can be updated with the {@link Key.refresh} method.
* @param {Boolean} search (optional) retrieve Keys from external
* servers with the method(s) defined in gnupg (e.g. WKD/HKP lookup)
* @returns {Promise<Array<GPGME_Key>>}
@@ -97,7 +96,6 @@ export class GPGME_Keyring {
break;
}
}
- // TODO getArmor() to be used in sync
}
}
let k = createKey(result.keys[i].fingerprint,