fork-openpgpjs/test/general
larabr 40542fd08a
Simplify return value of generateKey, reformatKey and revokeKey and add support for binary output (#1345)
- `openpgp.generateKey`, `reformatKey` and `revokeKey` take a new `format`
option, whose possible values are: `'armor', 'binary', 'object'` (default is 
`'armor'`).
- `generateKey` and `reformatKey` now return an object of the form `{
publicKey, privateKey, revocationCertificate }`, where the type of `publicKey`
and `privateKey` depends on `options.format`:
    * if `format: 'armor'` then `privateKey, publicKey` are armored strings;
    * if `format: 'binary'` then `privateKey, publicKey` are `Uint8Array`;
    * if `format: 'object'` then `privateKey, publicKey` are `PrivateKey` and
`PublicKey` objects respectively;
- `revokeKey` now returns `{ publicKey, privateKey }`, where:
    * if a `PrivateKey` is passed as `key` input,  `privateKey, publicKey` are of the
requested format;
    * if a `PublicKey` is passed as `key` input, `publicKey` is of the requested format,
while `privateKey` is `null` (previously, in this case the `privateKey` field
was not defined).

Breaking changes:
- In `revokeKey`, if no `format` option is specified, the returned `publicKey,
privateKey` are armored strings (they used to be objects).
- In `generateKey` and `reformatKey`, the `key` value is no longer returned.
- For all three functions, the `publicKeyArmored` and `privateKeyArmored`
values are no longer returned.
2021-06-24 17:14:39 +02:00
..
armor.js Replace Key with PrivateKey and PublicKey classes (#1300) 2021-05-25 19:18:47 +02:00
biginteger.js Lint all tests (#1235) 2021-02-12 23:00:22 +01:00
brainpool.js Simplify return value of generateKey, reformatKey and revokeKey and add support for binary output (#1345) 2021-06-24 17:14:39 +02:00
config.js Simplify return value of generateKey, reformatKey and revokeKey and add support for binary output (#1345) 2021-06-24 17:14:39 +02:00
decompression.js Consolidate read* functions (#1236) 2021-02-17 20:36:33 +01:00
ecc_nist.js Simplify return value of generateKey, reformatKey and revokeKey and add support for binary output (#1345) 2021-06-24 17:14:39 +02:00
ecc_secp256k1.js Simplify return value of generateKey, reformatKey and revokeKey and add support for binary output (#1345) 2021-06-24 17:14:39 +02:00
index.js Remove KeyRing class 2021-03-01 11:58:10 +01:00
key.js Simplify return value of generateKey, reformatKey and revokeKey and add support for binary output (#1345) 2021-06-24 17:14:39 +02:00
oid.js Lint all tests (#1235) 2021-02-12 23:00:22 +01:00
openpgp.js Simplify return value of generateKey, reformatKey and revokeKey and add support for binary output (#1345) 2021-06-24 17:14:39 +02:00
packet.js Ignore Trust and Marker packets on parsing and always throw on unexpected packets (#1340) 2021-06-23 12:17:29 +02:00
signature.js Simplify return value of generateKey, reformatKey and revokeKey and add support for binary output (#1345) 2021-06-24 17:14:39 +02:00
streaming.js Rename public/privateKeys to encryption/decryption/signing/verificationKeys (#1299) 2021-05-17 18:56:28 +02:00
testInputs.js Store named key params in key objects (#1141) 2021-02-09 19:25:20 +01:00
util.js Use consistent name casing (#1268) 2021-03-25 19:56:59 +01:00
x25519.js Simplify return value of generateKey, reformatKey and revokeKey and add support for binary output (#1345) 2021-06-24 17:14:39 +02:00