]> Dogcows Code - chaz/p5-File-KDBX/blob - README
Version 0.905
[chaz/p5-File-KDBX] / README
1 NAME
2
3 File::KDBX - Encrypted database to store secret text and files
4
5 VERSION
6
7 version 0.905
8
9 SYNOPSIS
10
11 use File::KDBX;
12
13 # Create a new database from scratch
14 my $kdbx = File::KDBX->new;
15
16 # Add some objects to the database
17 my $group = $kdbx->add_group(
18 name => 'Passwords',
19 );
20 my $entry = $group->add_entry(
21 title => 'My Bank',
22 username => 'mreynolds',
23 password => 's3cr3t',
24 );
25
26 # Save the database to the filesystem
27 $kdbx->dump_file('passwords.kdbx', 'masterpw changeme');
28
29 # Load the database from the filesystem into a new database instance
30 my $kdbx2 = File::KDBX->load_file('passwords.kdbx', 'masterpw changeme');
31
32 # Iterate over database entries, print entry titles
33 $kdbx2->entries->each(sub($entry, @) {
34 say 'Entry: ', $entry->title;
35 });
36
37 See "RECIPES" for more examples.
38
39 DESCRIPTION
40
41 File::KDBX provides everything you need to work with KDBX databases. A
42 KDBX database is a hierarchical object database which is commonly used
43 to store secret information securely. It was developed for the KeePass
44 password safe. See "Introduction to KDBX" for more information about
45 KDBX.
46
47 This module lets you query entries, create new entries, delete entries,
48 modify entries and more. The distribution also includes various parsers
49 and generators for serializing and persisting databases.
50
51 The design of this software was influenced by the KeePassXC
52 <https://github.com/keepassxreboot/keepassxc> implementation of KeePass
53 as well as the File::KeePass module. File::KeePass is an alternative
54 module that works well in most cases but has a small backlog of bugs
55 and security issues and also does not work with newer KDBX version 4
56 files. If you're coming here from the File::KeePass world, you might be
57 interested in File::KeePass::KDBX that is a drop-in replacement for
58 File::KeePass that uses File::KDBX for storage.
59
60 This software is a pre-1.0 release. The interface should be considered
61 pretty stable, but there might be minor changes up until a 1.0 release.
62 Breaking changes will be noted in the Changes file.
63
64 Features
65
66 * ☑ Read and write KDBX version 3 - version 4.1
67
68 * ☑ Read and write KDB files (requires File::KeePass)
69
70 * ☑ Unicode character strings
71
72 * ☑ "Simple Expression" Searching
73
74 * ☑ Placeholders and field references
75
76 * ☑ One-time passwords
77
78 * ☑ Very secure
79
80 * ☑ "Memory Protection"
81
82 * ☑ Challenge-response key components, like YubiKey
83
84 * ☑ Variety of key file types: binary, hexed, hashed, XML v1 and v2
85
86 * ☑ Pluggable registration of different kinds of ciphers and key
87 derivation functions
88
89 * ☑ Built-in database maintenance functions
90
91 * ☑ Pretty fast, with XS optimizations available
92
93 * ☒ Database synchronization / merging (not yet)
94
95 Introduction to KDBX
96
97 A KDBX database consists of a tree of groups and entries, with a single
98 root group. Entries can contain zero or more key-value pairs of strings
99 and zero or more binaries (i.e. octet strings). Groups, entries,
100 strings and binaries: that's the KDBX vernacular. A small amount of
101 metadata (timestamps, etc.) is associated with each entry, group and
102 the database as a whole.
103
104 You can think of a KDBX database kind of like a file system, where
105 groups are directories, entries are files, and strings and binaries
106 make up a file's contents.
107
108 Databases are typically persisted as encrypted, compressed files. They
109 are usually accessed directly (i.e. not over a network). The primary
110 focus of this type of database is data security. It is ideal for
111 storing relatively small amounts of data (strings and binaries) that
112 must remain secret except to such individuals as have the correct
113 master key. Even if the database file were to be "leaked" to the public
114 Internet, it should be virtually impossible to crack with a strong key.
115 The KDBX format is most often used by password managers to store
116 passwords so that users can know a single strong password and not have
117 to reuse passwords across different websites. See "SECURITY" for an
118 overview of security considerations.
119
120 ATTRIBUTES
121
122 sig1
123
124 sig2
125
126 version
127
128 headers
129
130 inner_headers
131
132 meta
133
134 binaries
135
136 deleted_objects
137
138 Hash of UUIDs for objects that have been deleted. This includes groups,
139 entries and even custom icons.
140
141 raw
142
143 Bytes contained within the encrypted layer of a KDBX file. This is only
144 set when using File::KDBX::Loader::Raw.
145
146 comment
147
148 A text string associated with the database. Often unset.
149
150 cipher_id
151
152 The UUID of a cipher used to encrypt the database when stored as a
153 file.
154
155 See File::KDBX::Cipher.
156
157 compression_flags
158
159 Configuration for whether or not and how the database gets compressed.
160 See ":compression" in File::KDBX::Constants.
161
162 master_seed
163
164 The master seed is a string of 32 random bytes that is used as salt in
165 hashing the master key when loading and saving the database. If a
166 challenge-response key is used in the master key, the master seed is
167 also the challenge.
168
169 The master seed should be changed each time the database is saved to
170 file.
171
172 transform_seed
173
174 The transform seed is a string of 32 random bytes that is used in the
175 key derivation function, either as the salt or the key (depending on
176 the algorithm).
177
178 The transform seed should be changed each time the database is saved to
179 file.
180
181 transform_rounds
182
183 The number of rounds or iterations used in the key derivation function.
184 Increasing this number makes loading and saving the database slower by
185 design in order to make dictionary and brute force attacks more costly.
186
187 encryption_iv
188
189 The initialization vector used by the cipher.
190
191 The encryption IV should be changed each time the database is saved to
192 file.
193
194 inner_random_stream_key
195
196 The encryption key (possibly including the IV, depending on the cipher)
197 used to encrypt the protected strings within the database.
198
199 stream_start_bytes
200
201 A string of 32 random bytes written in the header and encrypted in the
202 body. If the bytes do not match when loading a file then the wrong
203 master key was used or the file is corrupt. Only KDBX 2 and KDBX 3
204 files use this. KDBX 4 files use an improved HMAC method to verify the
205 master key and data integrity of the header and entire file body.
206
207 inner_random_stream_id
208
209 A number indicating the cipher algorithm used to encrypt the protected
210 strings within the database, usually Salsa20 or ChaCha20. See
211 ":random_stream" in File::KDBX::Constants.
212
213 kdf_parameters
214
215 A hash/dict of key-value pairs used to configure the key derivation
216 function. This is the KDBX4+ way to configure the KDF, superceding
217 "transform_seed" and "transform_rounds".
218
219 generator
220
221 The name of the software used to generate the KDBX file.
222
223 header_hash
224
225 The header hash used to verify that the file header is not corrupt.
226 (KDBX 2 - KDBX 3.1, removed KDBX 4.0)
227
228 database_name
229
230 Name of the database.
231
232 database_name_changed
233
234 Timestamp indicating when the database name was last changed.
235
236 database_description
237
238 Description of the database
239
240 database_description_changed
241
242 Timestamp indicating when the database description was last changed.
243
244 default_username
245
246 When a new entry is created, the UserName string will be populated with
247 this value.
248
249 default_username_changed
250
251 Timestamp indicating when the default username was last changed.
252
253 color
254
255 A color associated with the database (in the form #ffffff where "f" is
256 a hexidecimal digit). Some agents use this to help users visually
257 distinguish between different databases.
258
259 master_key_changed
260
261 Timestamp indicating when the master key was last changed.
262
263 master_key_change_rec
264
265 Number of days until the agent should prompt to recommend changing the
266 master key.
267
268 master_key_change_force
269
270 Number of days until the agent should prompt to force changing the
271 master key.
272
273 Note: This is purely advisory. It is up to the individual agent
274 software to actually enforce it. File::KDBX does NOT enforce it.
275
276 custom_icons
277
278 Array of custom icons that can be associated with groups and entries.
279
280 This list can be managed with the methods "add_custom_icon" and
281 "remove_custom_icon".
282
283 recycle_bin_enabled
284
285 Boolean indicating whether removed groups and entries should go to a
286 recycle bin or be immediately deleted.
287
288 recycle_bin_uuid
289
290 The UUID of a group used to store thrown-away groups and entries.
291
292 recycle_bin_changed
293
294 Timestamp indicating when the recycle bin group was last changed.
295
296 entry_templates_group
297
298 The UUID of a group containing template entries used when creating new
299 entries.
300
301 entry_templates_group_changed
302
303 Timestamp indicating when the entry templates group was last changed.
304
305 last_selected_group
306
307 The UUID of the previously-selected group.
308
309 last_top_visible_group
310
311 The UUID of the group visible at the top of the list.
312
313 history_max_items
314
315 The maximum number of historical entries that should be kept for each
316 entry. Default is 10.
317
318 history_max_size
319
320 The maximum total size (in bytes) that each individual entry's history
321 is allowed to grow. Default is 6 MiB.
322
323 maintenance_history_days
324
325 The maximum age (in days) historical entries should be kept. Default it
326 365.
327
328 settings_changed
329
330 Timestamp indicating when the database settings were last updated.
331
332 protect_title
333
334 Alias of the "memory_protection" setting for the Title string.
335
336 protect_username
337
338 Alias of the "memory_protection" setting for the UserName string.
339
340 protect_password
341
342 Alias of the "memory_protection" setting for the Password string.
343
344 protect_url
345
346 Alias of the "memory_protection" setting for the URL string.
347
348 protect_notes
349
350 Alias of the "memory_protection" setting for the Notes string.
351
352 METHODS
353
354 new
355
356 $kdbx = File::KDBX->new(%attributes);
357 $kdbx = File::KDBX->new($kdbx); # copy constructor
358
359 Construct a new File::KDBX.
360
361 init
362
363 $kdbx = $kdbx->init(%attributes);
364
365 Initialize a File::KDBX with a set of attributes. Returns itself to
366 allow method chaining.
367
368 This is called by "new".
369
370 reset
371
372 $kdbx = $kdbx->reset;
373
374 Set a File::KDBX to an empty state, ready to load a KDBX file or build
375 a new one. Returns itself to allow method chaining.
376
377 clone
378
379 $kdbx_copy = $kdbx->clone;
380 $kdbx_copy = File::KDBX->new($kdbx);
381
382 Clone a File::KDBX. The clone will be an exact copy and completely
383 independent of the original.
384
385 load
386
387 load_string
388
389 load_file
390
391 load_handle
392
393 $kdbx = KDBX::File->load(\$string, $key);
394 $kdbx = KDBX::File->load(*IO, $key);
395 $kdbx = KDBX::File->load($filepath, $key);
396 $kdbx->load(...); # also instance method
397
398 $kdbx = File::KDBX->load_string($string, $key);
399 $kdbx = File::KDBX->load_string(\$string, $key);
400 $kdbx->load_string(...); # also instance method
401
402 $kdbx = File::KDBX->load_file($filepath, $key);
403 $kdbx->load_file(...); # also instance method
404
405 $kdbx = File::KDBX->load_handle($fh, $key);
406 $kdbx = File::KDBX->load_handle(*IO, $key);
407 $kdbx->load_handle(...); # also instance method
408
409 Load a KDBX file from a string buffer, IO handle or file from a
410 filesystem.
411
412 File::KDBX::Loader does the heavy lifting.
413
414 dump
415
416 dump_string
417
418 dump_file
419
420 dump_handle
421
422 $kdbx->dump(\$string, $key);
423 $kdbx->dump(*IO, $key);
424 $kdbx->dump($filepath, $key);
425
426 $kdbx->dump_string(\$string, $key);
427 \$string = $kdbx->dump_string($key);
428
429 $kdbx->dump_file($filepath, $key);
430
431 $kdbx->dump_handle($fh, $key);
432 $kdbx->dump_handle(*IO, $key);
433
434 Dump a KDBX file to a string buffer, IO handle or file in a filesystem.
435
436 File::KDBX::Dumper does the heavy lifting.
437
438 user_agent_string
439
440 $string = $kdbx->user_agent_string;
441
442 Get a text string identifying the database client software.
443
444 memory_protection
445
446 \%settings = $kdbx->memory_protection
447 $kdbx->memory_protection(\%settings);
448
449 $bool = $kdbx->memory_protection($string_key);
450 $kdbx->memory_protection($string_key => $bool);
451
452 Get or set memory protection settings. This globally (for the whole
453 database) configures whether and which of the standard strings should
454 be memory-protected. The default setting is to memory-protect only
455 Password strings.
456
457 Memory protection can be toggled individually for each entry string,
458 and individual settings take precedence over these global settings.
459
460 minimum_version
461
462 $version = $kdbx->minimum_version;
463
464 Determine the minimum file version required to save a database
465 losslessly. Using certain databases features might increase this value.
466 For example, setting the KDF to Argon2 will increase the minimum
467 version to at least KDBX_VERSION_4_0 (i.e. 0x00040000) because Argon2
468 was introduced with KDBX4.
469
470 This method never returns less than KDBX_VERSION_3_1 (i.e. 0x00030001).
471 That file version is so ubiquitous and well-supported, there are seldom
472 reasons to dump in a lesser format nowadays.
473
474 WARNING: If you dump a database with a minimum version higher than the
475 current "version", the dumper will typically issue a warning and
476 automatically upgrade the database. This seems like the safest behavior
477 in order to avoid data loss, but lower versions have the benefit of
478 being compatible with more software. It is possible to prevent
479 auto-upgrades by explicitly telling the dumper which version to use,
480 but you do run the risk of data loss. A database will never be
481 automatically downgraded.
482
483 root
484
485 $group = $kdbx->root;
486 $kdbx->root($group);
487
488 Get or set a database's root group. You don't necessarily need to
489 explicitly create or set a root group because it autovivifies when
490 adding entries and groups to the database.
491
492 Every database has only a single root group at a time. Some old KDB
493 files might have multiple root groups. When reading such files, a
494 single implicit root group is created to contain the actual root
495 groups. When writing to such a format, if the root group looks like it
496 was implicitly created then it won't be written and the resulting file
497 might have multiple root groups, as it was before loading. This allows
498 working with older files without changing their written internal
499 structure while still adhering to modern semantics while the database
500 is opened.
501
502 The root group of a KDBX database contains all of the database's
503 entries and other groups. If you replace the root group, you are
504 essentially replacing the entire database contents with something else.
505
506 trace_lineage
507
508 \@lineage = $kdbx->trace_lineage($group);
509 \@lineage = $kdbx->trace_lineage($group, $base_group);
510 \@lineage = $kdbx->trace_lineage($entry);
511 \@lineage = $kdbx->trace_lineage($entry, $base_group);
512
513 Get the direct line of ancestors from $base_group (default: the root
514 group) to a group or entry. The lineage includes the base group but not
515 the target group or entry. Returns undef if the target is not in the
516 database structure.
517
518 recycle_bin
519
520 $group = $kdbx->recycle_bin;
521 $kdbx->recycle_bin($group);
522
523 Get or set the recycle bin group. Returns undef if there is no recycle
524 bin and "recycle_bin_enabled" is false, otherwise the current recycle
525 bin or an autovivified recycle bin group is returned.
526
527 entry_templates
528
529 $group = $kdbx->entry_templates;
530 $kdbx->entry_templates($group);
531
532 Get or set the entry templates group. May return undef if unset.
533
534 last_selected
535
536 $group = $kdbx->last_selected;
537 $kdbx->last_selected($group);
538
539 Get or set the last selected group. May return undef if unset.
540
541 last_top_visible
542
543 $group = $kdbx->last_top_visible;
544 $kdbx->last_top_visible($group);
545
546 Get or set the last top visible group. May return undef if unset.
547
548 add_group
549
550 $kdbx->add_group($group);
551 $kdbx->add_group(%group_attributes, %options);
552
553 Add a group to a database. This is equivalent to identifying a parent
554 group and calling "add_group" in File::KDBX::Group on the parent group,
555 forwarding the arguments. Available options:
556
557 * group - Group object or group UUID to add the group to (default:
558 root group)
559
560 groups
561
562 \&iterator = $kdbx->groups(%options);
563 \&iterator = $kdbx->groups($base_group, %options);
564
565 Get an File::KDBX::Iterator over groups within a database. Options:
566
567 * base - Only include groups within a base group (same as
568 $base_group) (default: "root")
569
570 * inclusive - Include the base group in the results (default: true)
571
572 * algorithm - Search algorithm, one of ids, bfs or dfs (default: ids)
573
574 add_entry
575
576 $kdbx->add_entry($entry, %options);
577 $kdbx->add_entry(%entry_attributes, %options);
578
579 Add an entry to a database. This is equivalent to identifying a parent
580 group and calling "add_entry" in File::KDBX::Group on the parent group,
581 forwarding the arguments. Available options:
582
583 * group - Group object or group UUID to add the entry to (default:
584 root group)
585
586 entries
587
588 \&iterator = $kdbx->entries(%options);
589 \&iterator = $kdbx->entries($base_group, %options);
590
591 Get an File::KDBX::Iterator over entries within a database. Supports
592 the same options as "groups", plus some new ones:
593
594 * auto_type - Only include entries with auto-type enabled (default:
595 false, include all)
596
597 * searching - Only include entries within groups with searching
598 enabled (default: false, include all)
599
600 * history - Also include historical entries (default: false, include
601 only current entries)
602
603 objects
604
605 \&iterator = $kdbx->objects(%options);
606 \&iterator = $kdbx->objects($base_group, %options);
607
608 Get an File::KDBX::Iterator over objects within a database. Groups and
609 entries are considered objects, so this is essentially a combination of
610 "groups" and "entries". This won't often be useful, but it can be
611 convenient for maintenance tasks. This method takes the same options as
612 "groups" and "entries".
613
614 custom_icon
615
616 \%icon = $kdbx->custom_icon($uuid);
617 $kdbx->custom_icon($uuid => \%icon);
618 $kdbx->custom_icon(%icon);
619 $kdbx->custom_icon(uuid => $value, %icon);
620
621 Get or set custom icons.
622
623 custom_icon_data
624
625 $image_data = $kdbx->custom_icon_data($uuid);
626
627 Get a custom icon image data.
628
629 add_custom_icon
630
631 $uuid = $kdbx->add_custom_icon($image_data, %attributes);
632 $uuid = $kdbx->add_custom_icon(%attributes);
633
634 Add a custom icon and get its UUID. If not provided, a random UUID will
635 be generated. Possible attributes:
636
637 * uuid - Icon UUID (default: autogenerated)
638
639 * data - Image data (same as $image_data)
640
641 * name - Name of the icon (text, KDBX4.1+)
642
643 * last_modification_time - Just what it says (datetime, KDBX4.1+)
644
645 remove_custom_icon
646
647 $kdbx->remove_custom_icon($uuid);
648
649 Remove a custom icon.
650
651 custom_data
652
653 \%all_data = $kdbx->custom_data;
654 $kdbx->custom_data(\%all_data);
655
656 \%data = $kdbx->custom_data($key);
657 $kdbx->custom_data($key => \%data);
658 $kdbx->custom_data(%data);
659 $kdbx->custom_data(key => $value, %data);
660
661 Get and set custom data. Custom data is metadata associated with a
662 database.
663
664 Each data item can have a few attributes associated with it.
665
666 * key - A unique text string identifier used to look up the data item
667 (required)
668
669 * value - A text string value (required)
670
671 * last_modification_time (optional, KDBX4.1+)
672
673 custom_data_value
674
675 $value = $kdbx->custom_data_value($key);
676
677 Exactly the same as "custom_data" except returns just the custom data's
678 value rather than a structure of attributes. This is a shortcut for:
679
680 my $data = $kdbx->custom_data($key);
681 my $value = defined $data ? $data->{value} : undef;
682
683 public_custom_data
684
685 \%all_data = $kdbx->public_custom_data;
686 $kdbx->public_custom_data(\%all_data);
687
688 $value = $kdbx->public_custom_data($key);
689 $kdbx->public_custom_data($key => $value);
690
691 Get and set public custom data. Public custom data is similar to custom
692 data but different in some important ways. Public custom data:
693
694 * can store strings, booleans and up to 64-bit integer values (custom
695 data can only store text values)
696
697 * is NOT encrypted within a KDBX file (hence the "public" part of the
698 name)
699
700 * is a plain hash/dict of key-value pairs with no other associated
701 fields (like modification times)
702
703 add_deleted_object
704
705 $kdbx->add_deleted_object($uuid);
706
707 Add a UUID to the deleted objects list. This list is used to support
708 automatic database merging.
709
710 You typically do not need to call this yourself because the list will
711 be populated automatically as objects are removed.
712
713 remove_deleted_object
714
715 $kdbx->remove_deleted_object($uuid);
716
717 Remove a UUID from the deleted objects list. This list is used to
718 support automatic database merging.
719
720 You typically do not need to call this yourself because the list will
721 be maintained automatically as objects are added.
722
723 clear_deleted_objects
724
725 Remove all UUIDs from the deleted objects list. This list is used to
726 support automatic database merging, but if you don't need merging then
727 you can clear deleted objects to reduce the database file size.
728
729 resolve_reference
730
731 $string = $kdbx->resolve_reference($reference);
732 $string = $kdbx->resolve_reference($wanted, $search_in, $expression);
733
734 Resolve a field reference
735 <https://keepass.info/help/base/fieldrefs.html>. A field reference is a
736 kind of string placeholder. You can use a field reference to refer
737 directly to a standard field within an entry. Field references are
738 resolved automatically while expanding entry strings (i.e. replacing
739 placeholders), but you can use this method to resolve on-the-fly
740 references that aren't part of any actual string in the database.
741
742 If the reference does not resolve to any field, undef is returned. If
743 the reference resolves to multiple fields, only the first one is
744 returned (in the same order as iterated by "entries"). To avoid
745 ambiguity, you can refer to a specific entry by its UUID.
746
747 The syntax of a reference is: {REF:<WantedField>@<SearchIn>:<Text>}.
748 Text is a "Simple Expression". WantedField and SearchIn are both single
749 character codes representing a field:
750
751 * T - Title
752
753 * U - UserName
754
755 * P - Password
756
757 * A - URL
758
759 * N - Notes
760
761 * I - UUID
762
763 * O - Other custom strings
764
765 Since O does not represent any specific field, it cannot be used as the
766 WantedField.
767
768 Examples:
769
770 To get the value of the UserName string of the first entry with "My
771 Bank" in the title:
772
773 my $username = $kdbx->resolve_reference('{REF:U@T:"My Bank"}');
774 # OR the {REF:...} wrapper is optional
775 my $username = $kdbx->resolve_reference('U@T:"My Bank"');
776 # OR separate the arguments
777 my $username = $kdbx->resolve_reference(U => T => '"My Bank"');
778
779 Note how the text is a "Simple Expression", so search terms with spaces
780 must be surrounded in double quotes.
781
782 To get the Password string of a specific entry (identified by its
783 UUID):
784
785 my $password = $kdbx->resolve_reference('{REF:P@I:46C9B1FFBD4ABC4BBB260C6190BAD20C}');
786
787 lock
788
789 $kdbx->lock;
790
791 Encrypt all protected strings and binaries in a database. The encrypted
792 data is stored in a File::KDBX::Safe associated with the database and
793 the actual values will be replaced with undef to indicate their
794 protected state. Returns itself to allow method chaining.
795
796 You can call lock on an already-locked database to memory-protect any
797 unprotected strings and binaries added after the last time the database
798 was locked.
799
800 unlock
801
802 $kdbx->unlock;
803
804 Decrypt all protected strings and binaries in a database, replacing
805 undef value placeholders with their actual, unprotected values. Returns
806 itself to allow method chaining.
807
808 unlock_scoped
809
810 $guard = $kdbx->unlock_scoped;
811
812 Unlock a database temporarily, relocking when the guard is released
813 (typically at the end of a scope). Returns undef if the database is
814 already unlocked.
815
816 See "lock" and "unlock".
817
818 Example:
819
820 {
821 my $guard = $kdbx->unlock_scoped;
822 ...;
823 }
824 # $kdbx is now memory-locked
825
826 peek
827
828 $string = $kdbx->peek(\%string);
829 $string = $kdbx->peek(\%binary);
830
831 Peek at the value of a protected string or binary without unlocking the
832 whole database. The argument can be a string or binary hashref as
833 returned by "string" in File::KDBX::Entry or "binary" in
834 File::KDBX::Entry.
835
836 is_locked
837
838 $bool = $kdbx->is_locked;
839
840 Get whether or not a database's contents are in a locked (i.e.
841 memory-protected) state. If this is true, then some or all of the
842 protected strings and binaries within the database will be unavailable
843 (literally have undef values) until "unlock" is called.
844
845 remove_empty_groups
846
847 $kdbx->remove_empty_groups;
848
849 Remove groups with no subgroups and no entries.
850
851 remove_unused_icons
852
853 $kdbx->remove_unused_icons;
854
855 Remove icons that are not associated with any entry or group in the
856 database.
857
858 remove_duplicate_icons
859
860 $kdbx->remove_duplicate_icons;
861
862 Remove duplicate icons as determined by hashing the icon data.
863
864 prune_history
865
866 $kdbx->prune_history(%options);
867
868 Remove just as many older historical entries as necessary to get under
869 certain limits.
870
871 * max_items - Maximum number of historical entries to keep (default:
872 value of "history_max_items", no limit: -1)
873
874 * max_size - Maximum total size (in bytes) of historical entries to
875 keep (default: value of "history_max_size", no limit: -1)
876
877 * max_age - Maximum age (in days) of historical entries to keep
878 (default: value of "maintenance_history_days", no limit: -1)
879
880 randomize_seeds
881
882 $kdbx->randomize_seeds;
883
884 Set various keys, seeds and IVs to random values. These values are used
885 by the cryptographic functions that secure the database when dumped.
886 The attributes that will be randomized are:
887
888 * "encryption_iv"
889
890 * "inner_random_stream_key"
891
892 * "master_seed"
893
894 * "stream_start_bytes"
895
896 * "transform_seed"
897
898 Randomizing these values has no effect on a loaded database. These are
899 only used when a database is dumped. You normally do not need to call
900 this method explicitly because the dumper does it for you by default.
901
902 key
903
904 $key = $kdbx->key;
905 $key = $kdbx->key($key);
906 $key = $kdbx->key($primitive);
907
908 Get or set a File::KDBX::Key. This is the master key (e.g. a password
909 or a key file that can decrypt a database). You can also pass a
910 primitive castable to a Key. See "new" in File::KDBX::Key for an
911 explanation of what the primitive can be.
912
913 You generally don't need to call this directly because you can provide
914 the key directly to the loader or dumper when loading or dumping a KDBX
915 file.
916
917 composite_key
918
919 $key = $kdbx->composite_key($key);
920 $key = $kdbx->composite_key($primitive);
921
922 Construct a File::KDBX::Key::Composite from a Key or primitive. See
923 "new" in File::KDBX::Key for an explanation of what the primitive can
924 be. If the primitive does not represent a composite key, it will be
925 wrapped.
926
927 You generally don't need to call this directly. The loader and dumper
928 use it to transform a master key into a raw encryption key.
929
930 kdf
931
932 $kdf = $kdbx->kdf(%options);
933 $kdf = $kdbx->kdf(\%parameters, %options);
934
935 Get a File::KDBX::KDF (key derivation function).
936
937 Options:
938
939 * params - KDF parameters, same as \%parameters (default: value of
940 "kdf_parameters")
941
942 cipher
943
944 $cipher = $kdbx->cipher(key => $key);
945 $cipher = $kdbx->cipher(key => $key, iv => $iv, uuid => $uuid);
946
947 Get a File::KDBX::Cipher capable of encrypting and decrypting the body
948 of a database file.
949
950 A key is required. This should be a raw encryption key made up of a
951 fixed number of octets (depending on the cipher), not a File::KDBX::Key
952 or primitive.
953
954 If not passed, the UUID comes from $kdbx->headers->{cipher_id} and the
955 encryption IV comes from $kdbx->headers->{encryption_iv}.
956
957 You generally don't need to call this directly. The loader and dumper
958 use it to decrypt and encrypt KDBX files.
959
960 random_stream
961
962 $cipher = $kdbx->random_stream;
963 $cipher = $kdbx->random_stream(id => $stream_id, key => $key);
964
965 Get a File::KDBX::Cipher::Stream for decrypting and encrypting
966 protected values.
967
968 If not passed, the ID and encryption key comes from
969 $kdbx->headers->{inner_random_stream_id} and
970 $kdbx->headers->{inner_random_stream_key} (respectively) for KDBX3
971 files and from $kdbx->inner_headers->{inner_random_stream_key} and
972 $kdbx->inner_headers->{inner_random_stream_id} (respectively) for KDBX4
973 files.
974
975 You generally don't need to call this directly. The loader and dumper
976 use it to scramble protected strings.
977
978 RECIPES
979
980 Create a new database
981
982 my $kdbx = File::KDBX->new;
983
984 my $group = $kdbx->add_group(name => 'Passwords);
985 my $entry = $group->add_entry(
986 title => 'WayneCorp',
987 username => 'bwayne',
988 password => 'iambatman',
989 url => 'https://example.com/login'
990 );
991 $entry->add_auto_type_window_association('WayneCorp - Mozilla Firefox', '{PASSWORD}{ENTER}');
992
993 $kdbx->dump_file('mypasswords.kdbx', 'master password CHANGEME');
994
995 Read an existing database
996
997 my $kdbx = File::KDBX->load_file('mypasswords.kdbx', 'master password CHANGEME');
998 $kdbx->unlock; # cause $entry->password below to be defined
999
1000 $kdbx->entries->each(sub($entry, @) {
1001 say 'Found password for: ', $entry->title;
1002 say ' Username: ', $entry->username;
1003 say ' Password: ', $entry->password;
1004 });
1005
1006 Search for entries
1007
1008 my @entries = $kdbx->entries(searching => 1)
1009 ->grep(title => 'WayneCorp')
1010 ->each; # return all matches
1011
1012 The searching option limits results to only entries within groups with
1013 searching enabled. Other options are also available. See "entries".
1014
1015 See "QUERY" for many more query examples.
1016
1017 Search for entries by auto-type window association
1018
1019 my $window_title = 'WayneCorp - Mozilla Firefox';
1020
1021 my $entries = $kdbx->entries(auto_type => 1)
1022 ->filter(sub {
1023 my ($ata) = grep { $_->{window} =~ /\Q$window_title\E/i } @{$_->auto_type_associations};
1024 return [$_, $ata->{keystroke_sequence}] if $ata;
1025 })
1026 ->each(sub {
1027 my ($entry, $keys) = @$_;
1028 say 'Entry title: ', $entry->title, ', key sequence: ', $keys;
1029 });
1030
1031 Example output:
1032
1033 Entry title: WayneCorp, key sequence: {PASSWORD}{ENTER}
1034
1035 Remove entries from a database
1036
1037 $kdbx->entries
1038 ->grep(notes => {'=~' => qr/too old/i})
1039 ->each(sub { $_->recycle });
1040
1041 Recycle all entries with the string "too old" appearing in the Notes
1042 string.
1043
1044 Remove empty groups
1045
1046 $kdbx->groups(algorithm => 'dfs')
1047 ->where(-true => 'is_empty')
1048 ->each('remove');
1049
1050 With the search/iteration algorithm set to "dfs", groups will be
1051 ordered deepest first and the root group will be last. This allows
1052 removing groups that only contain empty groups.
1053
1054 This can also be done with one call to "remove_empty_groups".
1055
1056 SECURITY
1057
1058 One of the biggest threats to your database security is how easily the
1059 encryption key can be brute-forced. Strong brute-force protection
1060 depends on:
1061
1062 * Using unguessable passwords, passphrases and key files.
1063
1064 * Using a brute-force resistent key derivation function.
1065
1066 The first factor is up to you. This module does not enforce strong
1067 master keys. It is up to you to pick or generate strong keys.
1068
1069 The KDBX format allows for the key derivation function to be tuned. The
1070 idea is that you want each single brute-force attempt to be expensive
1071 (in terms of time, CPU usage or memory usage), so that making a lot of
1072 attempts (which would be required if you have a strong master key) gets
1073 really expensive.
1074
1075 How expensive you want to make each attempt is up to you and can depend
1076 on the application.
1077
1078 This and other KDBX-related security issues are covered here more in
1079 depth: https://keepass.info/help/base/security.html
1080
1081 Here are other security risks you should be thinking about:
1082
1083 Cryptography
1084
1085 This distribution uses the excellent CryptX and Crypt::Argon2 packages
1086 to handle all crypto-related functions. As such, a lot of the security
1087 depends on the quality of these dependencies. Fortunately these modules
1088 are maintained and appear to have good track records.
1089
1090 The KDBX format has evolved over time to incorporate improved security
1091 practices and cryptographic functions. This package uses the following
1092 functions for authentication, hashing, encryption and random number
1093 generation:
1094
1095 * AES-128 (legacy)
1096
1097 * AES-256
1098
1099 * Argon2d & Argon2id
1100
1101 * CBC block mode
1102
1103 * HMAC-SHA256
1104
1105 * SHA256
1106
1107 * SHA512
1108
1109 * Salsa20 & ChaCha20
1110
1111 * Twofish
1112
1113 At the time of this writing, I am not aware of any successful attacks
1114 against any of these functions. These are among the most-analyzed and
1115 widely-adopted crypto functions available.
1116
1117 The KDBX format allows the body cipher and key derivation function to
1118 be configured. If a flaw is discovered in one of these functions, you
1119 can hopefully just switch to a better function without needing to
1120 update this software. A later software release may phase out the use of
1121 any functions which are no longer secure.
1122
1123 Memory Protection
1124
1125 It is not a good idea to keep secret information unencrypted in system
1126 memory for longer than is needed. The address space of your program can
1127 generally be read by a user with elevated privileges on the system. If
1128 your system is memory-constrained or goes into a hibernation mode, the
1129 contents of your address space could be written to a disk where it
1130 might be persisted for long time.
1131
1132 There might be system-level things you can do to reduce your risk, like
1133 using swap encryption and limiting system access to your program's
1134 address space while your program is running.
1135
1136 File::KDBX helps minimize (but not eliminate) risk by keeping secrets
1137 encrypted in memory until accessed and zeroing out memory that holds
1138 secrets after they're no longer needed, but it's not a silver bullet.
1139
1140 For one thing, the encryption key is stored in the same address space.
1141 If core is dumped, the encryption key is available to be found out. But
1142 at least there is the chance that the encryption key and the encrypted
1143 secrets won't both be paged out together while memory-constrained.
1144
1145 Another problem is that some perls (somewhat notoriously) copy around
1146 memory behind the scenes willy nilly, and it's difficult know when perl
1147 makes a copy of a secret in order to be able to zero it out later. It
1148 might be impossible. The good news is that perls with SvPV
1149 copy-on-write (enabled by default beginning with perl 5.20) are much
1150 better in this regard. With COW, it's mostly possible to know what
1151 operations will cause perl to copy the memory of a scalar string, and
1152 the number of copies will be significantly reduced. There is a unit
1153 test named t/memory-protection.t in this distribution that can be run
1154 on POSIX systems to determine how well File::KDBX memory protection is
1155 working.
1156
1157 Memory protection also depends on how your application handles secrets.
1158 If your app code is handling scalar strings with secret information,
1159 it's up to you to make sure its memory is zeroed out when no longer
1160 needed. "erase" in File::KDBX::Util et al. provide some tools to help
1161 accomplish this. Or if you're not too concerned about the risks memory
1162 protection is meant to mitigate, then maybe don't worry about it. The
1163 security policy of File::KDBX is to try hard to keep secrets protected
1164 while in memory so that your app might claim a high level of security,
1165 in case you care about that.
1166
1167 There are some memory protection strategies that File::KDBX does NOT
1168 use today but could in the future:
1169
1170 Many systems allow programs to mark unswappable pages. Secret
1171 information should ideally be stored in such pages. You could
1172 potentially use mlockall(2) (or equivalent for your system) in your own
1173 application to prevent the entire address space from being swapped.
1174
1175 Some systems provide special syscalls for storing secrets in memory
1176 while keeping the encryption key outside of the program's address
1177 space, like CryptProtectMemory for Windows. This could be a good
1178 option, though unfortunately not portable.
1179
1180 QUERY
1181
1182 To find things in a KDBX database, you should use a filtered iterator.
1183 If you have an iterator, such as returned by "entries", "groups" or
1184 even "objects" you can filter it using "where" in File::KDBX::Iterator.
1185
1186 my $filtered_entries = $kdbx->entries->where(\&query);
1187
1188 A \&query is just a subroutine that you can either write yourself or
1189 have generated for you from either a "Simple Expression" or
1190 "Declarative Syntax". It's easier to have your query generated, so I'll
1191 cover that first.
1192
1193 Simple Expression
1194
1195 A simple expression is mostly compatible with the KeePass 2
1196 implementation described here
1197 <https://keepass.info/help/base/search.html#mode_se>.
1198
1199 An expression is a string with one or more space-separated terms. Terms
1200 with spaces can be enclosed in double quotes. Terms are negated if they
1201 are prefixed with a minus sign. A record must match every term on at
1202 least one of the given fields.
1203
1204 So a simple expression is something like what you might type into a
1205 search engine. You can generate a simple expression query using
1206 "simple_expression_query" in File::KDBX::Util or by passing the simple
1207 expression as a scalar reference to where.
1208
1209 To search for all entries in a database with the word "canyon"
1210 appearing anywhere in the title:
1211
1212 my $entries = $kdbx->entries->where(\'canyon', qw[title]);
1213
1214 Notice the first argument is a scalarref. This disambiguates a simple
1215 expression from other types of queries covered below.
1216
1217 As mentioned, a simple expression can have multiple terms. This simple
1218 expression query matches any entry that has the words "red" and
1219 "canyon" anywhere in the title:
1220
1221 my $entries = $kdbx->entries->where(\'red canyon', qw[title]);
1222
1223 Each term in the simple expression must be found for an entry to match.
1224
1225 To search for entries with "red" in the title but not "canyon", just
1226 prepend "canyon" with a minus sign:
1227
1228 my $entries = $kdbx->entries->where(\'red -canyon', qw[title]);
1229
1230 To search over multiple fields simultaneously, just list them all. To
1231 search for entries with "grocery" (but not "Foodland") in the title or
1232 notes:
1233
1234 my $entries = $kdbx->entries->where(\'grocery -Foodland', qw[title notes]);
1235
1236 The default operator is a case-insensitive regexp match, which is fine
1237 for searching text loosely. You can use just about any binary
1238 comparison operator that perl supports. To specify an operator, list it
1239 after the simple expression. For example, to search for any entry that
1240 has been used at least five times:
1241
1242 my $entries = $kdbx->entries->where(\5, '>=', qw[usage_count]);
1243
1244 It helps to read it right-to-left, like "usage_count is greater than or
1245 equal to 5".
1246
1247 If you find the disambiguating structures to be distracting or
1248 confusing, you can also use the "simple_expression_query" in
1249 File::KDBX::Util function as a more intuitive alternative. The
1250 following example is equivalent to the previous:
1251
1252 my $entries = $kdbx->entries->where(simple_expression_query(5, '>=', qw[usage_count]));
1253
1254 Declarative Syntax
1255
1256 Structuring a declarative query is similar to "WHERE CLAUSES" in
1257 SQL::Abstract, but you don't have to be familiar with that module. Just
1258 learn by examples here.
1259
1260 To search for all entries in a database titled "My Bank":
1261
1262 my $entries = $kdbx->entries->where({ title => 'My Bank' });
1263
1264 The query here is { title => 'My Bank' }. A hashref can contain
1265 key-value pairs where the key is an attribute of the thing being
1266 searched for (in this case an entry) and the value is what you want the
1267 thing's attribute to be to consider it a match. In this case, the
1268 attribute we're using as our match criteria is "title" in
1269 File::KDBX::Entry, a text field. If an entry has its title attribute
1270 equal to "My Bank", it's a match.
1271
1272 A hashref can contain multiple attributes. The search candidate will be
1273 a match if all of the specified attributes are equal to their
1274 respective values. For example, to search for all entries with a
1275 particular URL AND username:
1276
1277 my $entries = $kdbx->entries->where({
1278 url => 'https://example.com',
1279 username => 'neo',
1280 });
1281
1282 To search for entries matching any criteria, just change the hashref to
1283 an arrayref. To search for entries with a particular URL OR username:
1284
1285 my $entries = $kdbx->entries->where([ # <-- Notice the square bracket
1286 url => 'https://example.com',
1287 username => 'neo',
1288 ]);
1289
1290 You can use different operators to test different types of attributes.
1291 The "icon_id" in File::KDBX::Entry attribute is a number, so we should
1292 use a number comparison operator. To find entries using the smartphone
1293 icon:
1294
1295 my $entries = $kdbx->entries->where({
1296 icon_id => { '==', ICON_SMARTPHONE },
1297 });
1298
1299 Note: "ICON_SMARTPHONE" in File::KDBX::Constants is just a constant
1300 from File::KDBX::Constants. It isn't special to this example or to
1301 queries generally. We could have just used a literal number.
1302
1303 The important thing to notice here is how we wrapped the condition in
1304 another hashref with a single key-value pair where the key is the name
1305 of an operator and the value is the thing to match against. The
1306 supported operators are:
1307
1308 * eq - String equal
1309
1310 * ne - String not equal
1311
1312 * lt - String less than
1313
1314 * gt - String greater than
1315
1316 * le - String less than or equal
1317
1318 * ge - String greater than or equal
1319
1320 * == - Number equal
1321
1322 * != - Number not equal
1323
1324 * < - Number less than
1325
1326 * > - Number greater than
1327
1328 * <= - Number less than or equal
1329
1330 * >= - Number less than or equal
1331
1332 * =~ - String match regular expression
1333
1334 * !~ - String does not match regular expression
1335
1336 * ! - Boolean false
1337
1338 * !! - Boolean true
1339
1340 Other special operators:
1341
1342 * -true - Boolean true
1343
1344 * -false - Boolean false
1345
1346 * -not - Boolean false (alias for -false)
1347
1348 * -defined - Is defined
1349
1350 * -undef - Is not defined
1351
1352 * -empty - Is empty
1353
1354 * -nonempty - Is not empty
1355
1356 * -or - Logical or
1357
1358 * -and - Logical and
1359
1360 Let's see another example using an explicit operator. To find all
1361 groups except one in particular (identified by its "uuid" in
1362 File::KDBX::Group), we can use the ne (string not equal) operator:
1363
1364 my $groups = $kdbx->groups->where(
1365 uuid => {
1366 'ne' => uuid('596f7520-6172-6520-7370-656369616c2e'),
1367 },
1368 );
1369
1370 Note: "uuid" in File::KDBX::Util is a little utility function to
1371 convert a UUID in its pretty form into bytes. This utility function
1372 isn't special to this example or to queries generally. It could have
1373 been written with a literal such as "\x59\x6f\x75\x20\x61...", but
1374 that's harder to read.
1375
1376 Notice we searched for groups this time. Finding groups works exactly
1377 the same as it does for entries.
1378
1379 Notice also that we didn't wrap the query in hashref curly-braces or
1380 arrayref square-braces. Those are optional. By default it will only
1381 match ALL attributes (as if there were curly-braces).
1382
1383 Testing the truthiness of an attribute is a little bit different
1384 because it isn't a binary operation. To find all entries with the
1385 password quality check disabled:
1386
1387 my $entries = $kdbx->entries->where('!' => 'quality_check');
1388
1389 This time the string after the operator is the attribute name rather
1390 than a value to compare the attribute against. To test that a boolean
1391 value is true, use the !! operator (or -true if !! seems a little too
1392 weird for your taste):
1393
1394 my $entries = $kdbx->entries->where('!!' => 'quality_check');
1395 my $entries = $kdbx->entries->where(-true => 'quality_check'); # same thing
1396
1397 Yes, there is also a -false and a -not if you prefer one of those over
1398 !. -false and -not (along with -true) are also special in that you can
1399 use them to invert the logic of a subquery. These are logically
1400 equivalent:
1401
1402 my $entries = $kdbx->entries->where(-not => { title => 'My Bank' });
1403 my $entries = $kdbx->entries->where(title => { 'ne' => 'My Bank' });
1404
1405 These special operators become more useful when combined with two more
1406 special operators: -and and -or. With these, it is possible to
1407 construct more interesting queries with groups of logic. For example:
1408
1409 my $entries = $kdbx->entries->where({
1410 title => { '=~', qr/bank/ },
1411 -not => {
1412 -or => {
1413 notes => { '=~', qr/business/ },
1414 icon_id => { '==', ICON_TRASHCAN_FULL },
1415 },
1416 },
1417 });
1418
1419 In English, find entries where the word "bank" appears anywhere in the
1420 title but also do not have either the word "business" in the notes or
1421 are using the full trashcan icon.
1422
1423 Subroutine Query
1424
1425 Lastly, as mentioned at the top, you can ignore all this and write your
1426 own subroutine. Your subroutine will be called once for each object
1427 being searched over. The subroutine should match the candidate against
1428 whatever criteria you want and return true if it matches or false to
1429 skip. To do this, just pass your subroutine coderef to where.
1430
1431 To review the different types of queries, these are all equivalent to
1432 find all entries in the database titled "My Bank":
1433
1434 my $entries = $kdbx->entries->where(\'"My Bank"', 'eq', qw[title]); # simple expression
1435 my $entries = $kdbx->entries->where(title => 'My Bank'); # declarative syntax
1436 my $entries = $kdbx->entries->where(sub { $_->title eq 'My Bank' }); # subroutine query
1437
1438 This is a trivial example, but of course your subroutine can be
1439 arbitrarily complex.
1440
1441 All of these query mechanisms described in this section are just tools,
1442 each with its own set of limitations. If the tools are getting in your
1443 way, you can of course iterate over the contents of a database and
1444 implement your own query logic, like this:
1445
1446 my $entries = $kdbx->entries;
1447 while (my $entry = $entries->next) {
1448 if (wanted($entry)) {
1449 do_something($entry);
1450 }
1451 else {
1452 ...
1453 }
1454 }
1455
1456 Iteration
1457
1458 Iterators are the built-in way to navigate or walk the database tree.
1459 You get an iterator from "entries", "groups" and "objects". You can
1460 specify the search algorithm to iterate over objects in different
1461 orders using the algorithm option, which can be one of these constants:
1462
1463 * ITERATION_IDS - Iterative deepening search (default)
1464
1465 * ITERATION_DFS - Depth-first search
1466
1467 * ITERATION_BFS - Breadth-first search
1468
1469 When iterating over objects generically, groups always precede their
1470 direct entries (if any). When the history option is used, current
1471 entries always precede historical entries.
1472
1473 If you have a database tree like this:
1474
1475 Database
1476 - Root
1477 - Group1
1478 - EntryA
1479 - Group2
1480 - EntryB
1481 - Group3
1482 - EntryC
1483
1484 * IDS order of groups is: Root, Group1, Group2, Group3
1485
1486 * IDS order of entries is: EntryA, EntryB, EntryC
1487
1488 * IDS order of objects is: Root, Group1, EntryA, Group2, EntryB,
1489 Group3, EntryC
1490
1491 * DFS order of groups is: Group2, Group1, Group3, Root
1492
1493 * DFS order of entries is: EntryB, EntryA, EntryC
1494
1495 * DFS order of objects is: Group2, EntryB, Group1, EntryA, Group3,
1496 EntryC, Root
1497
1498 * BFS order of groups is: Root, Group1, Group3, Group2
1499
1500 * BFS order of entries is: EntryA, EntryC, EntryB
1501
1502 * BFS order of objects is: Root, Group1, EntryA, Group3, EntryC,
1503 Group2, EntryB
1504
1505 SYNCHRONIZING
1506
1507 TODO - This is a planned feature, not yet implemented.
1508
1509 ERRORS
1510
1511 Errors in this package are constructed as File::KDBX::Error objects and
1512 propagated using perl's built-in mechanisms. Fatal errors are
1513 propagated using "die LIST" in perlfunc and non-fatal errors (a.k.a.
1514 warnings) are propagated using "warn LIST" in perlfunc while adhering
1515 to perl's warnings system. If you're already familiar with these
1516 mechanisms, you can skip this section.
1517
1518 You can catch fatal errors using "eval BLOCK" in perlfunc (or something
1519 like Try::Tiny) and non-fatal errors using $SIG{__WARN__} (see "%SIG"
1520 in perlvar). Examples:
1521
1522 use File::KDBX::Error qw(error);
1523
1524 my $key = ''; # uh oh
1525 eval {
1526 $kdbx->load_file('whatever.kdbx', $key);
1527 };
1528 if (my $error = error($@)) {
1529 handle_missing_key($error) if $error->type eq 'key.missing';
1530 $error->throw;
1531 }
1532
1533 or using Try::Tiny:
1534
1535 try {
1536 $kdbx->load_file('whatever.kdbx', $key);
1537 }
1538 catch {
1539 handle_error($_);
1540 };
1541
1542 Catching non-fatal errors:
1543
1544 my @warnings;
1545 local $SIG{__WARN__} = sub { push @warnings, $_[0] };
1546
1547 $kdbx->load_file('whatever.kdbx', $key);
1548
1549 handle_warnings(@warnings) if @warnings;
1550
1551 By default perl prints warnings to STDERR if you don't catch them. If
1552 you don't want to catch them and also don't want them printed to
1553 STDERR, you can suppress them lexically (perl v5.28 or higher
1554 required):
1555
1556 {
1557 no warnings 'File::KDBX';
1558 ...
1559 }
1560
1561 or locally:
1562
1563 {
1564 local $File::KDBX::WARNINGS = 0;
1565 ...
1566 }
1567
1568 or globally in your program:
1569
1570 $File::KDBX::WARNINGS = 0;
1571
1572 You cannot suppress fatal errors, and if you don't catch them your
1573 program will exit.
1574
1575 ENVIRONMENT
1576
1577 This software will alter its behavior depending on the value of certain
1578 environment variables:
1579
1580 * PERL_FILE_KDBX_XS - Do not use File::KDBX::XS if false (default:
1581 true)
1582
1583 * PERL_ONLY - Do not use File::KDBX::XS if true (default: false)
1584
1585 * NO_FORK - Do not fork if true (default: false)
1586
1587 SEE ALSO
1588
1589 * KeePass Password Safe <https://keepass.info/> - The original
1590 KeePass
1591
1592 * KeePassXC <https://keepassxc.org/> - Cross-Platform Password
1593 Manager written in C++
1594
1595 * File::KeePass has overlapping functionality. It's good but has a
1596 backlog of some pretty critical bugs and lacks support for newer KDBX
1597 features.
1598
1599 BUGS
1600
1601 Please report any bugs or feature requests on the bugtracker website
1602 https://github.com/chazmcgarvey/File-KDBX/issues
1603
1604 When submitting a bug or request, please include a test-file or a patch
1605 to an existing test-file that illustrates the bug or desired feature.
1606
1607 AUTHOR
1608
1609 Charles McGarvey <ccm@cpan.org>
1610
1611 COPYRIGHT AND LICENSE
1612
1613 This software is copyright (c) 2022 by Charles McGarvey.
1614
1615 This is free software; you can redistribute it and/or modify it under
1616 the same terms as the Perl 5 programming language system itself.
1617
This page took 0.113195 seconds and 4 git commands to generate.