This is a prerelease of v5.0.0. The full changelog since OpenPGP.js v4 can be found here. The changelog since v5.0.0-2 is:
- Switch from
Uint8Array.from
tonew Uint8Array
(fixes #1076) - Update pako (fixes #1301)
- Replace
Key
withPrivateKey
andPublicKey
classes (#1300)- Add
PrivateKey
andPublicKey
classes. APrivateKey
can always be passed where aPublicKey
key is expected, but not vice versa. - Unexport
Key
, and exportPrivateKey
andPublicKey
. - Rename
Key.packetlist2structure
toKey.packetListToStructure
. - Change
Key.update
to return a new updated key, rather than modifying the destination one in place. - Add
openpgp.readPrivateKey
andopenpgp.readPrivateKeys
to avoid having to downcast the result ofreadKey(s)
in TypeScript.
- Add
- Fix link in README's table of contents (#1307)
- Rename
public/privateKeys
toencryption/decryption/signing/verificationKeys
(#1299)- Rename
publicKeys
toencryptionKeys
orverificationKeys
depending on their use - Rename
privateKeys
todecryptionKeys
orsigningKeys
depending on their use - Similarly, rename
toUserIDs
toencryptionUserIDs
andfromUserIDs
tosigningUserIDs
- Rename
- Unexport
openpgp.stream
(#1291)
This change allows us to only load theReadableStream
polyfill when needed without behaving inconsistently in the external API.
Users of the library should use the globalReadableStream
or Node.jsstream.Readable
instead, or import a polyfill if needed. This version also loosens the detection criteria such that polyfilled streams are better detected. - Only ignore unsupported packets when
config.tolerant
is set (#1298)
Don't ignore parse errors ifconfig.tolerant
is enabled. This leads to more useful error messages in most cases, as ignoring these errors will most likely still lead to an error down the line (e.g. if a key binding signature is missing). Unsupported and unknown packets and packets with an unsupported or unknown version are still ignored, for forward compatibility. - Make key fingerprint computation async (#1297)
- Make
PacketList
a valid subtype ofArray
and updatePacket.tag
types (#1289) - Add
PacketList.fromBinary
and add missing config param in some functions (#1294)