Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw on empty passphrase in
encryptKey
and `SecretKeyPacket.encryp…
…t` (#1508) Breaking change: `openpgp.encryptKey` now throws if an empty string is given as passphrase. The operation used to succeed, but the resulting key was left in an inconsistent state, and e.g. serialization would not be possible. Non-breaking changes: - `options.passphrase` in `generateKey` and `reformatKey` now defaults to `undefined` instead of empty string. Passing an empty string does not throw for now, but this might change in the future to align with `encryptKey`'s behaviour. - In TS, add `GenerateKeyOptions` as alias of `KeyOptions`, to clarify its scope.
- Loading branch information
Showing
4 changed files
with
19 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters