diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2023-07-05 13:13:56 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2023-07-07 15:29:29 +0200 |
commit | 49914bbce890c2b9d2ae18905a306999103c28b6 (patch) | |
tree | e0de3b0984a81555de1e631cdc022eba41b3f062 /openpgp/src/parse | |
parent | a30a2cf128feb0ac8ee763c5b80d348900cca6b0 (diff) |
openpgp: Explicitly and selectively enable hashing.
- When we opt out of automatic hashing, it is useful to selectively
opt in to hashing on a per-one-pass-signature basis. Add
PacketParser::start_hashing to do this.
- This is somewhat similar to PacketParser::decrypt in that they are
invoked while the packet is in the packet parser, and they
communicate intent to act upon that packet.
- Fixes #1034.
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r-- | openpgp/src/parse/packet_parser_builder.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openpgp/src/parse/packet_parser_builder.rs b/openpgp/src/parse/packet_parser_builder.rs index 52ac1027..7427da59 100644 --- a/openpgp/src/parse/packet_parser_builder.rs +++ b/openpgp/src/parse/packet_parser_builder.rs @@ -371,6 +371,12 @@ impl<'a> PacketParserBuilder<'a> { /// algorithm specified in the packet. In some cases, this is not /// needed, and hashing will incur a non-trivial overhead. /// + /// If automatic hashing is disabled, then hashing may be + /// explicitly enabled using [`PacketParser::start_hashing`] while + /// parsing each [`OnePassSig`] packet. + /// + /// [`OnePassSig`]: crate::packet::OnePassSig + /// /// # Examples /// /// ``` |