1Using gpgme.js
2---------------
3At first, make sure that the environment you want to use gpgme.js in has access
4and permissions for nativeMessaging, and gpgme-json installed. For details,
5see the README.
6
7The library itself is started via the {@link init} method. This will test the
8nativeMessaging connection, and then resolve into an Object offering
9the top level API:
10
11* [encrypt]{@link GpgME#encrypt}
12* [decrypt]{@link GpgME#decrypt}
13* [sign]{@link GpgME#sign}
14* [verify]{@link GpgME#verify}
15* [Keyring]{@link GPGME_Keyring}
16
17```
18gpgmejs.init()
19    .then(function(GPGME) {
20        // using GPGME
21    }, function(error){
22        // error handling;
23    })
24```
25
26All methods that require communication with nativeMessaging are asynchronous,
27using Promises. Rejections will be instances of {@link GPGME_Error}.
28
29An exaeption are Keys, which can be initialized in a 'sync' mode, allowing them
30to be cached and used synchronously until manually refreshed.
31
32Keyring and Keys
33----------------
34The gnupg keys can be accessed via the [Keyring]{@link GPGME_Keyring}.
35
36The Keyring offers the methods for accessing information on all Keys known to
37gnupg.
38
39**Due to security constraints, the javascript-binding currently only offers
40limited support for secret-Key interaction.**
41
42The existence of secret Keys is not secret, and those secret Keys can be used
43for signing, but Operations that may expose, modify or delete secret Keys are
44not supported.
45
46* [getKeysArmored]{@link GPGME_Keyring#getKeysArmored}
47* [getKeys]{@link GPGME_Keyring#getKeys}
48* [getDefaultKey]{@link GPGME_Keyring#getDefaultKey}
49* [generateKey]{@link GPGME_Keyring#generateKey}
50* [deleteKey]{@link GPGME_Keyring#deleteKey}
51