diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2021-04-21 15:25:40 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2021-04-26 13:14:42 +0200 |
commit | 1d06cec55ad133584c13d11f78297c7582e9acda (patch) | |
tree | 95faccd45bb813416268fa1f8f1e7166ab37ae28 /openpgp/src/packet/signature | |
parent | 710f2c60a9a00a5a4c3199f25d387fe82aa21aa0 (diff) |
openpgp: New constant SubpacketAreas::MAX_SIZE.
Diffstat (limited to 'openpgp/src/packet/signature')
-rw-r--r-- | openpgp/src/packet/signature/subpacket.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/openpgp/src/packet/signature/subpacket.rs b/openpgp/src/packet/signature/subpacket.rs index 2f9570ef..23dc1546 100644 --- a/openpgp/src/packet/signature/subpacket.rs +++ b/openpgp/src/packet/signature/subpacket.rs @@ -591,6 +591,9 @@ impl<'a> IntoIterator for &'a SubpacketArea { } impl SubpacketArea { + /// The maximum size of a subpacket area. + pub const MAX_SIZE: usize = (1 << 16) - 1; + /// Returns a new subpacket area containing the given `packets`. pub fn new(packets: Vec<Subpacket>) -> Result<SubpacketArea> { let area = SubpacketArea { |