.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "File::KDBX::Dumper 3pm" .TH File::KDBX::Dumper 3pm "2022-11-20" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" File::KDBX::Dumper \- Write KDBX files .SH "VERSION" .IX Header "VERSION" version 0.906 .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" .SS "kdbx" .IX Subsection "kdbx" .Vb 2 \& $kdbx = $dumper\->kdbx; \& $dumper\->kdbx($kdbx); .Ve .PP Get or set the File::KDBX instance with the data to be dumped. .SS "format" .IX Subsection "format" Get the file format used for writing the database. Normally the format is auto-detected from the database, which is the safest choice. Possible formats: .IP "\(bu" 4 \&\f(CW\*(C`V3\*(C'\fR .IP "\(bu" 4 \&\f(CW\*(C`V4\*(C'\fR .IP "\(bu" 4 \&\f(CW\*(C`KDB\*(C'\fR .IP "\(bu" 4 \&\f(CW\*(C`XML\*(C'\fR (only used if explicitly set) .IP "\(bu" 4 \&\f(CW\*(C`Raw\*(C'\fR (only used if explicitly set) .PP \&\fB\s-1WARNING:\s0\fR There is a potential for data loss if you explicitly use a format that doesn't support the features used by the \s-1KDBX\s0 database being written. .PP The most common reason to explicitly specify the file format is to save a database as an unencrypted \s-1XML\s0 file: .PP .Vb 1 \& $kdbx\->dump_file(\*(Aqdatabase.xml\*(Aq, format => \*(AqXML\*(Aq); .Ve .SS "inner_format" .IX Subsection "inner_format" Get the format of the data inside the \s-1KDBX\s0 envelope. This only applies to \f(CW\*(C`V3\*(C'\fR and \f(CW\*(C`V4\*(C'\fR formats. Possible formats: .IP "\(bu" 4 \&\f(CW\*(C`XML\*(C'\fR \- Write the database groups and entries as \s-1XML\s0 (default) .IP "\(bu" 4 \&\f(CW\*(C`Raw\*(C'\fR \- Write \*(L"raw\*(R" in File::KDBX instead of the actual database contents .SS "allow_upgrade" .IX Subsection "allow_upgrade" .Vb 1 \& $bool = $dumper\->allow_upgrade; .Ve .PP Whether or not to allow implicitly upgrading a database to a newer version. When enabled, in order to avoid potential data loss, the database can be upgraded as-needed in cases where the database file format version is too low to support new features being used. .PP The default is to allow upgrading. .SS "randomize_seeds" .IX Subsection "randomize_seeds" .Vb 1 \& $bool = $dumper\->randomize_seeds; .Ve .PP Whether or not to randomize seeds in a database before writing. The default is to randomize seeds, and there's not often a good reason not to do so. If disabled, the seeds associated with the \s-1KDBX\s0 database will be used as they are. .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" .Vb 1 \& $dumper = File::KDBX::Dumper\->new(%attributes); .Ve .PP Construct a new File::KDBX::Dumper. .SS "init" .IX Subsection "init" .Vb 1 \& $dumper = $dumper\->init(%attributes); .Ve .PP Initialize a File::KDBX::Dumper with a new set of attributes. .PP This is called by \*(L"new\*(R". .SS "reset" .IX Subsection "reset" .Vb 1 \& $dumper = $dumper\->reset; .Ve .PP Set a File::KDBX::Dumper to a blank state, ready to dump another \s-1KDBX\s0 file. .SS "dump" .IX Subsection "dump" .Vb 6 \& $dumper\->dump(\e$string, %options); \& $dumper\->dump(\e$string, $key, %options); \& $dumper\->dump(*IO, %options); \& $dumper\->dump(*IO, $key, %options); \& $dumper\->dump($filepath, %options); \& $dumper\->dump($filepath, $key, %options); .Ve .PP Dump a \s-1KDBX\s0 file. .PP The \f(CW$key\fR is either a File::KDBX::Key or a primitive castable to a Key object. Available options: .IP "\(bu" 4 \&\f(CW\*(C`kdbx\*(C'\fR \- Database to dump (default: value of \*(L"kdbx\*(R") .IP "\(bu" 4 \&\f(CW\*(C`key\*(C'\fR \- Alternative way to specify \f(CW$key\fR (default: value of \*(L"File::KDBX/key\*(R") .PP Other options are supported depending on the first argument. See \*(L"dump_string\*(R", \*(L"dump_file\*(R" and \&\*(L"dump_handle\*(R". .SS "dump_string" .IX Subsection "dump_string" .Vb 4 \& $dumper\->dump_string(\e$string, %options); \& $dumper\->dump_string(\e$string, $key, %options); \& \e$string = $dumper\->dump_string(%options); \& \e$string = $dumper\->dump_string($key, %options); .Ve .PP Dump a \s-1KDBX\s0 file to a string / memory buffer. Available options: .IP "\(bu" 4 \&\f(CW\*(C`kdbx\*(C'\fR \- Database to dump (default: value of \*(L"kdbx\*(R") .IP "\(bu" 4 \&\f(CW\*(C`key\*(C'\fR \- Alternative way to specify \f(CW$key\fR (default: value of \*(L"File::KDBX/key\*(R") .SS "dump_file" .IX Subsection "dump_file" .Vb 2 \& $dumper\->dump_file($filepath, %options); \& $dumper\->dump_file($filepath, $key, %options); .Ve .PP Dump a \s-1KDBX\s0 file to a filesystem. Available options: .IP "\(bu" 4 \&\f(CW\*(C`kdbx\*(C'\fR \- Database to dump (default: value of \*(L"kdbx\*(R") .IP "\(bu" 4 \&\f(CW\*(C`key\*(C'\fR \- Alternative way to specify \f(CW$key\fR (default: value of \*(L"File::KDBX/key\*(R") .IP "\(bu" 4 \&\f(CW\*(C`mode\*(C'\fR \- File mode / permissions (see \*(L"chmod \s-1LIST\*(R"\s0 in perlfunc .IP "\(bu" 4 \&\f(CW\*(C`uid\*(C'\fR \- User \s-1ID\s0 (see \*(L"chown \s-1LIST\*(R"\s0 in perlfunc) .IP "\(bu" 4 \&\f(CW\*(C`gid\*(C'\fR \- Group \s-1ID\s0 (see \*(L"chown \s-1LIST\*(R"\s0 in perlfunc) .IP "\(bu" 4 \&\f(CW\*(C`atomic\*(C'\fR \- Write to the filepath atomically (default: true) .SS "dump_handle" .IX Subsection "dump_handle" .Vb 4 \& $dumper\->dump_handle($fh, %options); \& $dumper\->dump_handle(*IO, $key, %options); \& $dumper\->dump_handle($fh, %options); \& $dumper\->dump_handle(*IO, $key, %options); .Ve .PP Dump a \s-1KDBX\s0 file to an output stream / file handle. Available options: .IP "\(bu" 4 \&\f(CW\*(C`kdbx\*(C'\fR \- Database to dump (default: value of \*(L"kdbx\*(R") .IP "\(bu" 4 \&\f(CW\*(C`key\*(C'\fR \- Alternative way to specify \f(CW$key\fR (default: value of \*(L"File::KDBX/key\*(R") .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests on the bugtracker website .PP When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. .SH "AUTHOR" .IX Header "AUTHOR" Charles McGarvey .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2022 by Charles McGarvey. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.