summaryrefslogtreecommitdiffstats
path: root/openpgp/examples/statistics.rs
AgeCommit message (Collapse)Author
2020-09-21openpgp: Convert `extern crate` to `use` in examples.Wiktor Kwapisiewicz
2020-09-21openpgp: Adjust examples to use try operator.Wiktor Kwapisiewicz
- Change `expect` to `context(...)?`, - Change `unwrap` to `?`.
2020-07-15openpgp: Collect statistics about public key algorithms.Justus Winter
2020-04-16Revert "openpgp: Make PacketParserResult a std::result::Result."Justus Winter
This reverts commit 2e1eec5fe4157a391a13554ff7df3075cfe043cc.
2020-04-09openpgp: Make PacketParserResult a std::result::Result.Justus Winter
- This avoids the partial implementation imitating std::option::Option, replacing it with std::result::Result. - As a benefit, std::result::Result is in the prelude, simplifying a lot of parsing loops.
2020-03-03openpgp: Only impl Serialize for objects that are normally exported.Neal H. Walfield
- Add two new traits: `Marshal` and `MarshalInto`. - Implement them instead of `Serialize` and `SerializeInto`. - Only implement `Serialize` and `SerializeInto` for data structures that are normally exported. - This should prevent users from accidentally serializing a bare signature (`Signature`) when they meant to serialize a signature packet (`Packet`), for instance. - Fixes #368.
2020-01-02openpgp: Change SubpacketValue::Unknown to store the tag.Justus Winter
- Makes it possible to construct unknown packets with arbitrary subpacket tags. - Fixes a regression.
2019-12-17openpgp: Make Subpacket own the data.Justus Winter
- The subpacket areas now have a vector of subpackets. Change some accessors here and there to accommodate this. - This requires bit-perfect roundtripping of subpackets so that signatures are not invalidated. - First step towards fixing #200.
2019-12-06openpgp: Count first party vs third party signatures.Justus Winter
2019-11-28Call TPKs Certificates, update identifiers, documentation.Justus Winter
- Fixes #387.
2019-11-25openpgp: Rename openpgp::constants to openpgp::types.Justus Winter
- Fixes #381.
2019-11-05openpgp: Make fields of SubpacketValue private.Justus Winter
2019-09-29openpgp: Collect statistics about regular expressions.Justus Winter
2019-09-29openpgp: Collect statistics about exportable certs.Justus Winter
2019-09-29openpgp: Collect statistics on algorithm preferences.Justus Winter
2019-09-29openpgp: Collect KeyFlags statistics.Justus Winter
2019-09-29openpgp: Add per-signature subpacket statistics.Justus Winter
2019-09-29openpgp: Collect per-TPK subpacket statistics.Justus Winter
2019-09-27openpgp: Clean up deprecated range syntaxDaniel Silverstone
The `...` syntax is deprecated in favour of `..=` since 1.26 and is an idiom lint in the 2018 edition. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-09-11openpgp: Move packet::BodyLength to packet::header.Justus Winter
- Move the parser to the parse module.
2019-09-10openpgp: Make fields of packet::Header private.Justus Winter
2019-08-19openpgp: Rename sigtype to typ, set_sigtype to set_typ.Justus Winter
- 'sig' in method names on Signature and OnePassSig is redundant, and 'sigtype' is likely inherited from other implementations. - Fixes #326.
2019-07-15Prepare for Rust 2018.Justus Winter
- This is the result of running `cargo fix --edition`, with some manual adjustments. - The vast majority of changes merely qualify module paths with 'crate::'. - Two instances of adding an anonymous pattern to a trait's function. - `async` is a keyword in Rust 2018, and hence it needs to be escaped (e.g. in the case of the net::r#async module). - The manual adjustments were needed due to various shortcomings of the analysis employed by `cargo fix`, e.g. unexpanded macros, procedural macros, lalrpop grammars.
2019-03-04openpgp: Collect Signature Subpacket statistics.Justus Winter
2019-03-04openpgp: Only print signature stats if we saw some.Justus Winter
2019-02-20openpgp: Collect statistics over user attribute subpackets.Justus Winter
2019-02-20openpgp: Improve statistics.Justus Winter
- For every kind of packet, print the sum of the size of all packets of that kind.
2019-02-20openpgp: Parse more than one file.Justus Winter
- Keyserver dumps are typically split into several files.
2019-02-20openpgp: Update build instructions.Justus Winter
2018-12-14openpgp: Introduce trait Parse.Justus Winter
- Trait Parse introduces a uniform interface to parse packets, messages, keys, and related data structures.
2018-12-07openpgp: Make PacketParser's header field private.Justus Winter
2018-11-24Rename the openpgp crate to sequoia-openpgp.Justus Winter
2018-11-16openpgp: Improve example.Justus Winter
- Collect statistics about signatures.
2018-10-16openpgp: Improve examples.Justus Winter
- Fixes #112.
2018-10-09openpgp: Don't return the depth from PacketParser::{next,recurse}Neal H. Walfield
- Change PacketParser::next and PacketParser::recurse to not return the packets' depths. Instead, require the caller to query them using accessor functions, if they are needed (they usually aren't).
2018-09-17openpgp: Simplify example.Justus Winter
- Previously, the example explicitly constructed a BufferedReaderGeneric to make it use a larger buffer. By using PacketParser::from_file we both simplify the example, and make use of the new BufferedReaderFile.
2018-08-24openpgp: Make PacketParser's next() and recurse() return two tuples.Justus Winter
- This logically groups the returned values, and makes it easier to ignore both packet-related values. - See #27.
2018-07-02openpgp: Create a special Option-like type for PacketParser.Neal H. Walfield
- In the future, we want to return some summary information about a parsed packet sequence after the packet sequence is fully parsed. Currently, PacketParser::next() and PacketParser::recurse() consume the PacketParser and return None on EOF. Thus, even if the summary information were stored in the PacketParser, it becomes inaccessible on EOF. - This change introduces a new type, PacketParserResult, that contains either a PacketParser or a PacketParserEOF. PacketParserEOF is returned on EOF instead of None. Since it is a struct, it can hold only any information that we want to return to the caller.
2018-06-14openpgp: Move Tag into the packet module.Justus Winter
2018-05-31openpgp: Add example computing statistics over packets.Justus Winter