libkeepass 0.2.0
KeePass key database importer/exporter library
Loading...
Searching...
No Matches
limits.hh
Go to the documentation of this file.
1/*
2 * libkeepass - KeePass key database importer/exporter
3 * Copyright (C) 2014 Christian Kindahl
4 * Copyright (C) 2024 Dominik Krümpelmann
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
31#pragma once
32#include <cstdint>
33
34namespace keepass {
35namespace detail {
36
47 uint64_t max_total_bytes = (1ULL << 32);
48
50 uint64_t max_block_count = 100000;
51
53 uint32_t max_block_size = 1024 * 1024;
54
56 uint32_t max_xml_depth = 128;
57
59 uint32_t max_groups = 100000;
60
62 uint32_t max_entries = 100000;
63
65 uint32_t max_history_items = 10000;
66
68 uint64_t max_string_field_bytes = 16ULL * 1024 * 1024;
69
71 uint64_t max_binary_bytes = 128ULL * 1024 * 1024;
72};
73
74} // namespace detail
75} // namespace keepass
Configurable resource budgets for database import and XML parsing.
Definition limits.hh:45
uint64_t max_block_count
Definition limits.hh:50
uint32_t max_history_items
Definition limits.hh:65
uint64_t max_string_field_bytes
Definition limits.hh:68
uint32_t max_entries
Definition limits.hh:62
uint32_t max_groups
Definition limits.hh:59
uint64_t max_total_bytes
Definition limits.hh:47
uint64_t max_binary_bytes
Definition limits.hh:71
uint32_t max_xml_depth
Definition limits.hh:56
uint32_t max_block_size
Definition limits.hh:53