From 61e69380b7980e1597eb0f113bece480e7de8c7f Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Thu, 7 Jul 2022 21:52:59 -0600 Subject: [PATCH] Version 0.904 --- Changes | 3 + MANIFEST | 2 +- META.json | 84 +++++++++++++------------- META.yml | 82 ++++++++++++------------- Makefile.PL | 4 +- README | 8 +-- lib/File/KDBX.pm | 10 +-- lib/File/KDBX/Cipher.pm | 4 +- lib/File/KDBX/Cipher/CBC.pm | 4 +- lib/File/KDBX/Cipher/Stream.pm | 4 +- lib/File/KDBX/Constants.pm | 4 +- lib/File/KDBX/Dumper.pm | 4 +- lib/File/KDBX/Dumper/KDB.pm | 4 +- lib/File/KDBX/Dumper/Raw.pm | 4 +- lib/File/KDBX/Dumper/V3.pm | 4 +- lib/File/KDBX/Dumper/V4.pm | 4 +- lib/File/KDBX/Dumper/XML.pm | 4 +- lib/File/KDBX/Entry.pm | 62 +++++++++---------- lib/File/KDBX/Error.pm | 4 +- lib/File/KDBX/Group.pm | 4 +- lib/File/KDBX/IO.pm | 4 +- lib/File/KDBX/IO/Crypt.pm | 4 +- lib/File/KDBX/IO/HashBlock.pm | 4 +- lib/File/KDBX/IO/HmacBlock.pm | 4 +- lib/File/KDBX/Iterator.pm | 4 +- lib/File/KDBX/KDF.pm | 4 +- lib/File/KDBX/KDF/AES.pm | 4 +- lib/File/KDBX/KDF/Argon2.pm | 4 +- lib/File/KDBX/Key.pm | 4 +- lib/File/KDBX/Key/ChallengeResponse.pm | 4 +- lib/File/KDBX/Key/Composite.pm | 4 +- lib/File/KDBX/Key/File.pm | 4 +- lib/File/KDBX/Key/Password.pm | 4 +- lib/File/KDBX/Key/YubiKey.pm | 4 +- lib/File/KDBX/Loader.pm | 4 +- lib/File/KDBX/Loader/KDB.pm | 4 +- lib/File/KDBX/Loader/Raw.pm | 4 +- lib/File/KDBX/Loader/V3.pm | 4 +- lib/File/KDBX/Loader/V4.pm | 4 +- lib/File/KDBX/Loader/XML.pm | 4 +- lib/File/KDBX/Object.pm | 4 +- lib/File/KDBX/Safe.pm | 4 +- lib/File/KDBX/Transaction.pm | 4 +- lib/File/KDBX/Util.pm | 4 +- 44 files changed, 201 insertions(+), 198 deletions(-) diff --git a/Changes b/Changes index 8de6278..857ced2 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for File-KDBX. +0.904 2022-07-07 21:51:17-0600 + * Use expanded title, username in OTP parameters. + 0.903 2022-05-11 17:17:13-0600 * Fixed parsing KDBX4 datetimes on 32-bit perls. diff --git a/MANIFEST b/MANIFEST index 5510691..1acac53 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.024. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.025. Changes LICENSE MANIFEST diff --git a/META.json b/META.json index ff130aa..a3c9e99 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Charles McGarvey " ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 6.024, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -168,155 +168,155 @@ "provides" : { "File::KDBX" : { "file" : "lib/File/KDBX.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Cipher" : { "file" : "lib/File/KDBX/Cipher.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Cipher::CBC" : { "file" : "lib/File/KDBX/Cipher/CBC.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Cipher::Stream" : { "file" : "lib/File/KDBX/Cipher/Stream.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Constants" : { "file" : "lib/File/KDBX/Constants.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Dumper" : { "file" : "lib/File/KDBX/Dumper.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Dumper::KDB" : { "file" : "lib/File/KDBX/Dumper/KDB.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Dumper::Raw" : { "file" : "lib/File/KDBX/Dumper/Raw.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Dumper::V3" : { "file" : "lib/File/KDBX/Dumper/V3.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Dumper::V4" : { "file" : "lib/File/KDBX/Dumper/V4.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Dumper::XML" : { "file" : "lib/File/KDBX/Dumper/XML.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Entry" : { "file" : "lib/File/KDBX/Entry.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Error" : { "file" : "lib/File/KDBX/Error.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Group" : { "file" : "lib/File/KDBX/Group.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::IO" : { "file" : "lib/File/KDBX/IO.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::IO::Crypt" : { "file" : "lib/File/KDBX/IO/Crypt.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::IO::HashBlock" : { "file" : "lib/File/KDBX/IO/HashBlock.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::IO::HmacBlock" : { "file" : "lib/File/KDBX/IO/HmacBlock.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Iterator" : { "file" : "lib/File/KDBX/Iterator.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::KDF" : { "file" : "lib/File/KDBX/KDF.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::KDF::AES" : { "file" : "lib/File/KDBX/KDF/AES.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::KDF::Argon2" : { "file" : "lib/File/KDBX/KDF/Argon2.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Key" : { "file" : "lib/File/KDBX/Key.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Key::ChallengeResponse" : { "file" : "lib/File/KDBX/Key/ChallengeResponse.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Key::Composite" : { "file" : "lib/File/KDBX/Key/Composite.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Key::File" : { "file" : "lib/File/KDBX/Key/File.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Key::Password" : { "file" : "lib/File/KDBX/Key/Password.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Key::YubiKey" : { "file" : "lib/File/KDBX/Key/YubiKey.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Loader" : { "file" : "lib/File/KDBX/Loader.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Loader::KDB" : { "file" : "lib/File/KDBX/Loader/KDB.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Loader::Raw" : { "file" : "lib/File/KDBX/Loader/Raw.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Loader::V3" : { "file" : "lib/File/KDBX/Loader/V3.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Loader::V4" : { "file" : "lib/File/KDBX/Loader/V4.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Loader::XML" : { "file" : "lib/File/KDBX/Loader/XML.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Object" : { "file" : "lib/File/KDBX/Object.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Safe" : { "file" : "lib/File/KDBX/Safe.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Transaction" : { "file" : "lib/File/KDBX/Transaction.pm", - "version" : "0.903" + "version" : "0.904" }, "File::KDBX::Util" : { "file" : "lib/File/KDBX/Util.pm", - "version" : "0.903" + "version" : "0.904" } }, "release_status" : "stable", @@ -331,10 +331,10 @@ "web" : "https://github.com/chazmcgarvey/File-KDBX" } }, - "version" : "0.903", + "version" : "0.904", "x_authority" : "cpan:CCM", - "x_generated_by_perl" : "v5.34.1", - "x_serialization_backend" : "Cpanel::JSON::XS version 4.27", + "x_generated_by_perl" : "v5.36.0", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.30", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } diff --git a/META.yml b/META.yml index c0bda7d..855ea07 100644 --- a/META.yml +++ b/META.yml @@ -19,7 +19,7 @@ build_requires: configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'Dist::Zilla version 6.024, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -50,118 +50,118 @@ optional_features: provides: File::KDBX: file: lib/File/KDBX.pm - version: '0.903' + version: '0.904' File::KDBX::Cipher: file: lib/File/KDBX/Cipher.pm - version: '0.903' + version: '0.904' File::KDBX::Cipher::CBC: file: lib/File/KDBX/Cipher/CBC.pm - version: '0.903' + version: '0.904' File::KDBX::Cipher::Stream: file: lib/File/KDBX/Cipher/Stream.pm - version: '0.903' + version: '0.904' File::KDBX::Constants: file: lib/File/KDBX/Constants.pm - version: '0.903' + version: '0.904' File::KDBX::Dumper: file: lib/File/KDBX/Dumper.pm - version: '0.903' + version: '0.904' File::KDBX::Dumper::KDB: file: lib/File/KDBX/Dumper/KDB.pm - version: '0.903' + version: '0.904' File::KDBX::Dumper::Raw: file: lib/File/KDBX/Dumper/Raw.pm - version: '0.903' + version: '0.904' File::KDBX::Dumper::V3: file: lib/File/KDBX/Dumper/V3.pm - version: '0.903' + version: '0.904' File::KDBX::Dumper::V4: file: lib/File/KDBX/Dumper/V4.pm - version: '0.903' + version: '0.904' File::KDBX::Dumper::XML: file: lib/File/KDBX/Dumper/XML.pm - version: '0.903' + version: '0.904' File::KDBX::Entry: file: lib/File/KDBX/Entry.pm - version: '0.903' + version: '0.904' File::KDBX::Error: file: lib/File/KDBX/Error.pm - version: '0.903' + version: '0.904' File::KDBX::Group: file: lib/File/KDBX/Group.pm - version: '0.903' + version: '0.904' File::KDBX::IO: file: lib/File/KDBX/IO.pm - version: '0.903' + version: '0.904' File::KDBX::IO::Crypt: file: lib/File/KDBX/IO/Crypt.pm - version: '0.903' + version: '0.904' File::KDBX::IO::HashBlock: file: lib/File/KDBX/IO/HashBlock.pm - version: '0.903' + version: '0.904' File::KDBX::IO::HmacBlock: file: lib/File/KDBX/IO/HmacBlock.pm - version: '0.903' + version: '0.904' File::KDBX::Iterator: file: lib/File/KDBX/Iterator.pm - version: '0.903' + version: '0.904' File::KDBX::KDF: file: lib/File/KDBX/KDF.pm - version: '0.903' + version: '0.904' File::KDBX::KDF::AES: file: lib/File/KDBX/KDF/AES.pm - version: '0.903' + version: '0.904' File::KDBX::KDF::Argon2: file: lib/File/KDBX/KDF/Argon2.pm - version: '0.903' + version: '0.904' File::KDBX::Key: file: lib/File/KDBX/Key.pm - version: '0.903' + version: '0.904' File::KDBX::Key::ChallengeResponse: file: lib/File/KDBX/Key/ChallengeResponse.pm - version: '0.903' + version: '0.904' File::KDBX::Key::Composite: file: lib/File/KDBX/Key/Composite.pm - version: '0.903' + version: '0.904' File::KDBX::Key::File: file: lib/File/KDBX/Key/File.pm - version: '0.903' + version: '0.904' File::KDBX::Key::Password: file: lib/File/KDBX/Key/Password.pm - version: '0.903' + version: '0.904' File::KDBX::Key::YubiKey: file: lib/File/KDBX/Key/YubiKey.pm - version: '0.903' + version: '0.904' File::KDBX::Loader: file: lib/File/KDBX/Loader.pm - version: '0.903' + version: '0.904' File::KDBX::Loader::KDB: file: lib/File/KDBX/Loader/KDB.pm - version: '0.903' + version: '0.904' File::KDBX::Loader::Raw: file: lib/File/KDBX/Loader/Raw.pm - version: '0.903' + version: '0.904' File::KDBX::Loader::V3: file: lib/File/KDBX/Loader/V3.pm - version: '0.903' + version: '0.904' File::KDBX::Loader::V4: file: lib/File/KDBX/Loader/V4.pm - version: '0.903' + version: '0.904' File::KDBX::Loader::XML: file: lib/File/KDBX/Loader/XML.pm - version: '0.903' + version: '0.904' File::KDBX::Object: file: lib/File/KDBX/Object.pm - version: '0.903' + version: '0.904' File::KDBX::Safe: file: lib/File/KDBX/Safe.pm - version: '0.903' + version: '0.904' File::KDBX::Transaction: file: lib/File/KDBX/Transaction.pm - version: '0.903' + version: '0.904' File::KDBX::Util: file: lib/File/KDBX/Util.pm - version: '0.903' + version: '0.904' recommends: Compress::Raw::Zlib: '0' File::KDBX::XS: '0' @@ -211,8 +211,8 @@ resources: bugtracker: https://github.com/chazmcgarvey/File-KDBX/issues homepage: https://github.com/chazmcgarvey/File-KDBX repository: https://github.com/chazmcgarvey/File-KDBX.git -version: '0.903' +version: '0.904' x_authority: cpan:CCM -x_generated_by_perl: v5.34.1 +x_generated_by_perl: v5.36.0 x_serialization_backend: 'YAML::Tiny version 1.73' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' diff --git a/Makefile.PL b/Makefile.PL index c80427f..a554cb8 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.024. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.025. use strict; use warnings; @@ -69,7 +69,7 @@ my %WriteMakefileArgs = ( "lib" => 0, "utf8" => 0 }, - "VERSION" => "0.903", + "VERSION" => "0.904", "test" => { "TESTS" => "t/*.t" } diff --git a/README b/README index fac5d25..6e3ebb4 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ NAME VERSION - version 0.903 + version 0.904 SYNOPSIS @@ -1068,7 +1068,7 @@ SECURITY master keys. It is up to you to pick or generate strong keys. The KDBX format allows for the key derivation function to be tuned. The - idea is that you want each single brute-foce attempt to be expensive + idea is that you want each single brute-force attempt to be expensive (in terms of time, CPU usage or memory usage), so that making a lot of attempts (which would be required if you have a strong master key) gets really expensive. @@ -1246,7 +1246,7 @@ QUERY equal to 5". If you find the disambiguating structures to be distracting or - confusing, you can also the "simple_expression_query" in + confusing, you can also use the "simple_expression_query" in File::KDBX::Util function as a more intuitive alternative. The following example is equivalent to the previous: @@ -1302,7 +1302,7 @@ QUERY queries generally. We could have just used a literal number. The important thing to notice here is how we wrapped the condition in - another arrayref with a single key-value pair where the key is the name + another hashref with a single key-value pair where the key is the name of an operator and the value is the thing to match against. The supported operators are: diff --git a/lib/File/KDBX.pm b/lib/File/KDBX.pm index 02073ed..4d289df 100644 --- a/lib/File/KDBX.pm +++ b/lib/File/KDBX.pm @@ -20,7 +20,7 @@ use Time::Piece 1.33; use boolean; use namespace::clean; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION our $WARNINGS = 1; fieldhashes \my (%SAFE, %KEYS); @@ -1121,7 +1121,7 @@ File::KDBX - Encrypted database to store secret text and files =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS @@ -2230,7 +2230,7 @@ The first factor is up to you. This module does not enforce strong master keys. generate strong keys. The KDBX format allows for the key derivation function to be tuned. The idea is that you want each single -brute-foce attempt to be expensive (in terms of time, CPU usage or memory usage), so that making a lot of +brute-force attempt to be expensive (in terms of time, CPU usage or memory usage), so that making a lot of attempts (which would be required if you have a strong master key) gets I expensive. How expensive you want to make each attempt is up to you and can depend on the application. @@ -2394,7 +2394,7 @@ expression. For example, to search for any entry that has been used at least fiv It helps to read it right-to-left, like "usage_count is greater than or equal to 5". -If you find the disambiguating structures to be distracting or confusing, you can also the +If you find the disambiguating structures to be distracting or confusing, you can also use the L function as a more intuitive alternative. The following example is equivalent to the previous: @@ -2443,7 +2443,7 @@ icon: Note: L is just a constant from L. It isn't special to this example or to queries generally. We could have just used a literal number. -The important thing to notice here is how we wrapped the condition in another arrayref with a single key-value +The important thing to notice here is how we wrapped the condition in another hashref with a single key-value pair where the key is the name of an operator and the value is the thing to match against. The supported operators are: diff --git a/lib/File/KDBX/Cipher.pm b/lib/File/KDBX/Cipher.pm index 13e4757..4266dc6 100644 --- a/lib/File/KDBX/Cipher.pm +++ b/lib/File/KDBX/Cipher.pm @@ -12,7 +12,7 @@ use Module::Load; use Scalar::Util qw(looks_like_number); use namespace::clean; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION my %CIPHERS; @@ -158,7 +158,7 @@ File::KDBX::Cipher - A block cipher mode or cipher stream =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Cipher/CBC.pm b/lib/File/KDBX/Cipher/CBC.pm index 81fa7af..1524160 100644 --- a/lib/File/KDBX/Cipher/CBC.pm +++ b/lib/File/KDBX/Cipher/CBC.pm @@ -11,7 +11,7 @@ use namespace::clean; extends 'File::KDBX::Cipher'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION has key_size => 32; sub iv_size { 16 } @@ -63,7 +63,7 @@ File::KDBX::Cipher::CBC - A CBC block cipher mode encrypter/decrypter =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Cipher/Stream.pm b/lib/File/KDBX/Cipher/Stream.pm index f5072a9..ee02998 100644 --- a/lib/File/KDBX/Cipher/Stream.pm +++ b/lib/File/KDBX/Cipher/Stream.pm @@ -14,7 +14,7 @@ use namespace::clean; extends 'File::KDBX::Cipher'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION has 'counter', is => 'ro', default => 0; @@ -123,7 +123,7 @@ File::KDBX::Cipher::Stream - A cipher stream encrypter/decrypter =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Constants.pm b/lib/File/KDBX/Constants.pm index c412653..13e5163 100644 --- a/lib/File/KDBX/Constants.pm +++ b/lib/File/KDBX/Constants.pm @@ -15,7 +15,7 @@ use File::KDBX::Util qw(int64); use Scalar::Util qw(dualvar); use namespace::clean -except => 'import'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION BEGIN { my %CONSTANTS = ( @@ -348,7 +348,7 @@ File::KDBX::Constants - All the KDBX-related constants you could ever want =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Dumper.pm b/lib/File/KDBX/Dumper.pm index d300a02..0eca707 100644 --- a/lib/File/KDBX/Dumper.pm +++ b/lib/File/KDBX/Dumper.pm @@ -15,7 +15,7 @@ use Ref::Util qw(is_ref is_scalarref); use Scalar::Util qw(looks_like_number openhandle); use namespace::clean; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub new { @@ -287,7 +287,7 @@ File::KDBX::Dumper - Write KDBX files =head1 VERSION -version 0.903 +version 0.904 =head1 ATTRIBUTES diff --git a/lib/File/KDBX/Dumper/KDB.pm b/lib/File/KDBX/Dumper/KDB.pm index eceef18..1fab6f4 100644 --- a/lib/File/KDBX/Dumper/KDB.pm +++ b/lib/File/KDBX/Dumper/KDB.pm @@ -14,7 +14,7 @@ use namespace::clean; extends 'File::KDBX::Dumper'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub _write_magic_numbers { '' } sub _write_headers { '' } @@ -136,7 +136,7 @@ File::KDBX::Dumper::KDB - Write KDB files =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Dumper/Raw.pm b/lib/File/KDBX/Dumper/Raw.pm index 50f4923..82e4b6d 100644 --- a/lib/File/KDBX/Dumper/Raw.pm +++ b/lib/File/KDBX/Dumper/Raw.pm @@ -9,7 +9,7 @@ use namespace::clean; extends 'File::KDBX::Dumper'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub _dump { my $self = shift; @@ -48,7 +48,7 @@ File::KDBX::Dumper::Raw - A no-op dumper that dumps content as-is =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Dumper/V3.pm b/lib/File/KDBX/Dumper/V3.pm index d8246a0..d25a015 100644 --- a/lib/File/KDBX/Dumper/V3.pm +++ b/lib/File/KDBX/Dumper/V3.pm @@ -16,7 +16,7 @@ use namespace::clean; extends 'File::KDBX::Dumper'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub _write_headers { my $self = shift; @@ -187,7 +187,7 @@ File::KDBX::Dumper::V3 - Dump KDBX3 files =head1 VERSION -version 0.903 +version 0.904 =head1 BUGS diff --git a/lib/File/KDBX/Dumper/V4.pm b/lib/File/KDBX/Dumper/V4.pm index 723b20d..28e2a8b 100644 --- a/lib/File/KDBX/Dumper/V4.pm +++ b/lib/File/KDBX/Dumper/V4.pm @@ -19,7 +19,7 @@ use namespace::clean; extends 'File::KDBX::Dumper'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION has _binaries_written => {}, is => 'ro'; @@ -374,7 +374,7 @@ File::KDBX::Dumper::V4 - Dump KDBX4 files =head1 VERSION -version 0.903 +version 0.904 =head1 BUGS diff --git a/lib/File/KDBX/Dumper/XML.pm b/lib/File/KDBX/Dumper/XML.pm index cc31cd1..69c52d0 100644 --- a/lib/File/KDBX/Dumper/XML.pm +++ b/lib/File/KDBX/Dumper/XML.pm @@ -19,7 +19,7 @@ use namespace::clean; extends 'File::KDBX::Dumper'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION has allow_protection => 1; @@ -563,7 +563,7 @@ File::KDBX::Dumper::XML - Dump unencrypted XML KeePass files =head1 VERSION -version 0.903 +version 0.904 =head1 ATTRIBUTES diff --git a/lib/File/KDBX/Entry.pm b/lib/File/KDBX/Entry.pm index 4d667cb..7b9100d 100644 --- a/lib/File/KDBX/Entry.pm +++ b/lib/File/KDBX/Entry.pm @@ -11,7 +11,7 @@ use File::KDBX::Constants qw(:history :icon); use File::KDBX::Error; use File::KDBX::Util qw(:assert :class :coercion :erase :function :uri generate_uuid load_optional); use Hash::Util::FieldHash; -use List::Util qw(first sum0); +use List::Util qw(any first sum0); use Ref::Util qw(is_coderef is_hashref is_plain_hashref); use Scalar::Util qw(blessed looks_like_number); use Storable qw(dclone); @@ -21,7 +21,7 @@ use namespace::clean; extends 'File::KDBX::Object'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION my $PLACEHOLDER_MAX_DEPTH = 10; my %PLACEHOLDERS; @@ -301,7 +301,7 @@ sub hmac_otp { $params{secret} = encode_b32r($params{secret}) if !$params{base32}; $params{base32} = 1; - my $otp = eval {Pass::OTP::otp(%params, @_) }; + my $otp = eval { Pass::OTP::otp(%params, @_) }; if (my $err = $@) { throw 'Unable to generate HOTP', error => $err; } @@ -322,7 +322,7 @@ sub time_otp { $params{secret} = encode_b32r($params{secret}) if !$params{base32}; $params{base32} = 1; - my $otp = eval {Pass::OTP::otp(%params, @_) }; + my $otp = eval { Pass::OTP::otp(%params, @_) }; if (my $err = $@) { throw 'Unable to generate TOTP', error => $err; } @@ -377,8 +377,8 @@ sub _hotp_params { my %params = ( type => 'hotp', - issuer => $self->title || 'KDBX', - account => $self->username || 'none', + issuer => $self->expand_title || 'KDBX', + account => $self->expand_username || 'none', digits => 6, counter => $self->string_value('HmacOtp-Counter') // 0, $self->_otp_secret_params('Hmac'), @@ -403,8 +403,8 @@ sub _totp_params { ); my %params = ( type => 'totp', - issuer => $self->title || 'KDBX', - account => $self->username || 'none', + issuer => $self->expand_title || 'KDBX', + account => $self->expand_username || 'none', digits => $self->string_value('TimeOtp-Length') // 6, algorithm => $algorithms{$self->string_value('TimeOtp-Algorithm') || ''} || 'sha1', period => $self->string_value('TimeOtp-Period') // 30, @@ -681,7 +681,7 @@ File::KDBX::Entry - A KDBX database entry =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION @@ -1269,7 +1269,7 @@ An array of window title / keystroke sequence associations. keystroke_sequence => '{USERNAME}{TAB}{PASSWORD}{ENTER}', } -Keystroke sequences can have , most commonly C<{USERNAME}> and C<{PASSWORD}>. +Keystroke sequences can have L, most commonly C<{USERNAME}> and C<{PASSWORD}>. =head2 quality_check @@ -1336,26 +1336,6 @@ Alias for the B string value. Aliases for the B string value. -=head2 expand_notes - -Shortcut equivalent to C<< ->expand_string_value('Notes') >>. - -=head2 expand_password - -Shortcut equivalent to C<< ->expand_string_value('Password') >>. - -=head2 expand_title - -Shortcut equivalent to C<< ->expand_string_value('Title') >>. - -=head2 expand_url - -Shortcut equivalent to C<< ->expand_string_value('URL') >>. - -=head2 expand_username - -Shortcut equivalent to C<< ->expand_string_value('UserName') >>. - =head1 METHODS =head2 string @@ -1399,7 +1379,7 @@ is not set or is currently memory-protected. This is just a shortcut for: =head2 expand_string_value - $string = $entry->expand_string_value; + $string = $entry->expand_string_value($string_key); Same as L but will substitute placeholders and resolve field references. Any placeholders that do not expand to values are left as-is. @@ -1409,6 +1389,26 @@ See L. Some placeholders (notably field references) require the entry be connected to a database and will throw an error if it is not. +=head2 expand_notes + +Shortcut equivalent to C<< ->expand_string_value('Notes') >>. + +=head2 expand_password + +Shortcut equivalent to C<< ->expand_string_value('Password') >>. + +=head2 expand_title + +Shortcut equivalent to C<< ->expand_string_value('Title') >>. + +=head2 expand_url + +Shortcut equivalent to C<< ->expand_string_value('URL') >>. + +=head2 expand_username + +Shortcut equivalent to C<< ->expand_string_value('UserName') >>. + =head2 other_strings $other = $entry->other_strings; diff --git a/lib/File/KDBX/Error.pm b/lib/File/KDBX/Error.pm index 7181c77..6c3589c 100644 --- a/lib/File/KDBX/Error.pm +++ b/lib/File/KDBX/Error.pm @@ -9,7 +9,7 @@ use Exporter qw(import); use Scalar::Util qw(blessed looks_like_number); use namespace::clean -except => 'import'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION our @EXPORT = qw(alert error throw); @@ -167,7 +167,7 @@ File::KDBX::Error - Represents something bad that happened =head1 VERSION -version 0.903 +version 0.904 =head1 ATTRIBUTES diff --git a/lib/File/KDBX/Group.pm b/lib/File/KDBX/Group.pm index 9b8c8bf..4c6356f 100644 --- a/lib/File/KDBX/Group.pm +++ b/lib/File/KDBX/Group.pm @@ -19,7 +19,7 @@ use namespace::clean; extends 'File::KDBX::Object'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION # has uuid => sub { generate_uuid(printable => 1) }; @@ -398,7 +398,7 @@ File::KDBX::Group - A KDBX database group =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/IO.pm b/lib/File/KDBX/IO.pm index ef14245..a849354 100644 --- a/lib/File/KDBX/IO.pm +++ b/lib/File/KDBX/IO.pm @@ -14,7 +14,7 @@ use namespace::clean; extends 'IO::Handle'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub _croak { require Carp; goto &Carp::croak } @@ -390,7 +390,7 @@ File::KDBX::IO - Base IO class for KDBX-related streams =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/IO/Crypt.pm b/lib/File/KDBX/IO/Crypt.pm index e3ef400..4d188bd 100644 --- a/lib/File/KDBX/IO/Crypt.pm +++ b/lib/File/KDBX/IO/Crypt.pm @@ -11,7 +11,7 @@ use namespace::clean; extends 'File::KDBX::IO'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION our $BUFFER_SIZE = 16384; our $ERROR; @@ -139,7 +139,7 @@ File::KDBX::IO::Crypt - Encrypter/decrypter IO handle =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/IO/HashBlock.pm b/lib/File/KDBX/IO/HashBlock.pm index f3b5757..f7e200d 100644 --- a/lib/File/KDBX/IO/HashBlock.pm +++ b/lib/File/KDBX/IO/HashBlock.pm @@ -13,7 +13,7 @@ use namespace::clean; extends 'File::KDBX::IO'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION our $ALGORITHM = 'SHA256'; our $BLOCK_SIZE = 1048576; # 1MiB our $ERROR; @@ -208,7 +208,7 @@ File::KDBX::IO::HashBlock - Hash block stream IO handle =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/IO/HmacBlock.pm b/lib/File/KDBX/IO/HmacBlock.pm index be4902d..e47f004 100644 --- a/lib/File/KDBX/IO/HmacBlock.pm +++ b/lib/File/KDBX/IO/HmacBlock.pm @@ -13,7 +13,7 @@ use namespace::clean; extends 'File::KDBX::IO'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION our $BLOCK_SIZE = 1048576; # 1MiB our $ERROR; @@ -212,7 +212,7 @@ File::KDBX::IO::HmacBlock - HMAC block stream IO handle =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Iterator.pm b/lib/File/KDBX/Iterator.pm index e6b5665..1e4547f 100644 --- a/lib/File/KDBX/Iterator.pm +++ b/lib/File/KDBX/Iterator.pm @@ -14,7 +14,7 @@ use namespace::clean; BEGIN { mark_as_loaded('Iterator::Simple::Iterator') } extends 'Iterator::Simple::Iterator'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub new { @@ -221,7 +221,7 @@ File::KDBX::Iterator - KDBX database iterator =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/KDF.pm b/lib/File/KDBX/KDF.pm index 4520fb5..a3dc259 100644 --- a/lib/File/KDBX/KDF.pm +++ b/lib/File/KDBX/KDF.pm @@ -12,7 +12,7 @@ use Module::Load; use Scalar::Util qw(blessed); use namespace::clean; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION my %KDFS; @@ -120,7 +120,7 @@ File::KDBX::KDF - A key derivation function =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/KDF/AES.pm b/lib/File/KDBX/KDF/AES.pm index 206bc13..9b30c0a 100644 --- a/lib/File/KDBX/KDF/AES.pm +++ b/lib/File/KDBX/KDF/AES.pm @@ -13,7 +13,7 @@ use namespace::clean; extends 'File::KDBX::KDF'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION # Rounds higher than this are eligible for forking: my $FORK_OPTIMIZATION_THRESHOLD = 100_000; @@ -111,7 +111,7 @@ File::KDBX::KDF::AES - Using the AES cipher as a key derivation function =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/KDF/Argon2.pm b/lib/File/KDBX/KDF/Argon2.pm index 4e7889b..6d0ce8c 100644 --- a/lib/File/KDBX/KDF/Argon2.pm +++ b/lib/File/KDBX/KDF/Argon2.pm @@ -12,7 +12,7 @@ use namespace::clean; extends 'File::KDBX::KDF'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub salt { $_[0]->{+KDF_PARAM_ARGON2_SALT} or throw 'Salt is not set' } @@ -69,7 +69,7 @@ File::KDBX::KDF::Argon2 - The Argon2 family of key derivation functions =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Key.pm b/lib/File/KDBX/Key.pm index c790570..e57c3ca 100644 --- a/lib/File/KDBX/Key.pm +++ b/lib/File/KDBX/Key.pm @@ -14,7 +14,7 @@ use Ref::Util qw(is_arrayref is_coderef is_hashref is_ref is_scalarref); use Scalar::Util qw(blessed openhandle); use namespace::clean; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION fieldhashes \my %SAFE; @@ -140,7 +140,7 @@ File::KDBX::Key - A credential that can protect a KDBX file =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Key/ChallengeResponse.pm b/lib/File/KDBX/Key/ChallengeResponse.pm index 0e53369..071c9ec 100644 --- a/lib/File/KDBX/Key/ChallengeResponse.pm +++ b/lib/File/KDBX/Key/ChallengeResponse.pm @@ -10,7 +10,7 @@ use namespace::clean; extends 'File::KDBX::Key'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub init { my $self = shift; @@ -56,7 +56,7 @@ File::KDBX::Key::ChallengeResponse - A challenge-response key =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Key/Composite.pm b/lib/File/KDBX/Key/Composite.pm index 39253fa..659b85a 100644 --- a/lib/File/KDBX/Key/Composite.pm +++ b/lib/File/KDBX/Key/Composite.pm @@ -13,7 +13,7 @@ use namespace::clean; extends 'File::KDBX::Key'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub init { my $self = shift; @@ -92,7 +92,7 @@ File::KDBX::Key::Composite - A composite key made up of component keys =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Key/File.pm b/lib/File/KDBX/Key/File.pm index 32b27ad..a5ff6c8 100644 --- a/lib/File/KDBX/Key/File.pm +++ b/lib/File/KDBX/Key/File.pm @@ -17,7 +17,7 @@ use namespace::clean; extends 'File::KDBX::Key'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION has 'type', is => 'ro'; @@ -262,7 +262,7 @@ File::KDBX::Key::File - A file key =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Key/Password.pm b/lib/File/KDBX/Key/Password.pm index 9dac813..99c752c 100644 --- a/lib/File/KDBX/Key/Password.pm +++ b/lib/File/KDBX/Key/Password.pm @@ -12,7 +12,7 @@ use namespace::clean; extends 'File::KDBX::Key'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub init { my $self = shift; @@ -37,7 +37,7 @@ File::KDBX::Key::Password - A password key =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Key/YubiKey.pm b/lib/File/KDBX/Key/YubiKey.pm index 86337b4..838b296 100644 --- a/lib/File/KDBX/Key/YubiKey.pm +++ b/lib/File/KDBX/Key/YubiKey.pm @@ -14,7 +14,7 @@ use namespace::clean; extends 'File::KDBX::Key::ChallengeResponse'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION # It can take some time for the USB device to be ready again, so we can retry a few times. our $RETRY_COUNT = 5; @@ -296,7 +296,7 @@ File::KDBX::Key::YubiKey - A Yubico challenge-response key =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Loader.pm b/lib/File/KDBX/Loader.pm index 504fee7..049db25 100644 --- a/lib/File/KDBX/Loader.pm +++ b/lib/File/KDBX/Loader.pm @@ -14,7 +14,7 @@ use Ref::Util qw(is_ref is_scalarref); use Scalar::Util qw(looks_like_number openhandle); use namespace::clean; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub new { @@ -249,7 +249,7 @@ File::KDBX::Loader - Load KDBX files =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Loader/KDB.pm b/lib/File/KDBX/Loader/KDB.pm index 82ec7f1..812030d 100644 --- a/lib/File/KDBX/Loader/KDB.pm +++ b/lib/File/KDBX/Loader/KDB.pm @@ -17,7 +17,7 @@ use namespace::clean; extends 'File::KDBX::Loader'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION my $DEFAULT_EXPIRATION = Time::Piece->strptime('2999-12-31 23:59:59', '%Y-%m-%d %H:%M:%S'); @@ -397,7 +397,7 @@ File::KDBX::Loader::KDB - Read KDB files =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Loader/Raw.pm b/lib/File/KDBX/Loader/Raw.pm index d88e29f..6ac8f3b 100644 --- a/lib/File/KDBX/Loader/Raw.pm +++ b/lib/File/KDBX/Loader/Raw.pm @@ -9,7 +9,7 @@ use namespace::clean; extends 'File::KDBX::Loader'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub _read { my $self = shift; @@ -47,7 +47,7 @@ File::KDBX::Loader::Raw - A no-op loader that doesn't do any parsing =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Loader/V3.pm b/lib/File/KDBX/Loader/V3.pm index 0990bff..1b34a28 100644 --- a/lib/File/KDBX/Loader/V3.pm +++ b/lib/File/KDBX/Loader/V3.pm @@ -27,7 +27,7 @@ use namespace::clean; extends 'File::KDBX::Loader'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub _read_header { my $self = shift; @@ -174,7 +174,7 @@ File::KDBX::Loader::V3 - Load KDBX3 files =head1 VERSION -version 0.903 +version 0.904 =head1 BUGS diff --git a/lib/File/KDBX/Loader/V4.pm b/lib/File/KDBX/Loader/V4.pm index 0e011f0..ba07eea 100644 --- a/lib/File/KDBX/Loader/V4.pm +++ b/lib/File/KDBX/Loader/V4.pm @@ -30,7 +30,7 @@ use namespace::clean; extends 'File::KDBX::Loader'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub _read_header { my $self = shift; @@ -273,7 +273,7 @@ File::KDBX::Loader::V4 - Load KDBX4 files =head1 VERSION -version 0.903 +version 0.904 =head1 BUGS diff --git a/lib/File/KDBX/Loader/XML.pm b/lib/File/KDBX/Loader/XML.pm index a5fff50..3d4e671 100644 --- a/lib/File/KDBX/Loader/XML.pm +++ b/lib/File/KDBX/Loader/XML.pm @@ -18,7 +18,7 @@ use namespace::clean; extends 'File::KDBX::Loader'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION has '_reader', is => 'ro'; has '_safe', is => 'ro', default => sub { File::KDBX::Safe->new(cipher => $_[0]->kdbx->random_stream) }; @@ -589,7 +589,7 @@ File::KDBX::Loader::XML - Load unencrypted XML KeePass files =head1 VERSION -version 0.903 +version 0.904 =head1 BUGS diff --git a/lib/File/KDBX/Object.pm b/lib/File/KDBX/Object.pm index 50ad02b..67a0cab 100644 --- a/lib/File/KDBX/Object.pm +++ b/lib/File/KDBX/Object.pm @@ -14,7 +14,7 @@ use Ref::Util qw(is_arrayref is_plain_arrayref is_plain_hashref is_ref); use Scalar::Util qw(blessed weaken); use namespace::clean; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION fieldhashes \my (%KDBX, %PARENT, %TXNS, %REFS, %SIGNALS); @@ -526,7 +526,7 @@ File::KDBX::Object - A KDBX database object =head1 VERSION -version 0.903 +version 0.904 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Safe.pm b/lib/File/KDBX/Safe.pm index a8ec2b3..463ca7f 100644 --- a/lib/File/KDBX/Safe.pm +++ b/lib/File/KDBX/Safe.pm @@ -14,7 +14,7 @@ use Ref::Util qw(is_arrayref is_coderef is_hashref is_scalarref); use Scalar::Util qw(refaddr); use namespace::clean; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub new { @@ -217,7 +217,7 @@ File::KDBX::Safe - Keep strings encrypted while in memory =head1 VERSION -version 0.903 +version 0.904 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Transaction.pm b/lib/File/KDBX/Transaction.pm index 3d852fb..99088ec 100644 --- a/lib/File/KDBX/Transaction.pm +++ b/lib/File/KDBX/Transaction.pm @@ -8,7 +8,7 @@ use Devel::GlobalDestruction; use File::KDBX::Util qw(:class); use namespace::clean; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION sub new { @@ -59,7 +59,7 @@ File::KDBX::Transaction - Make multiple database edits atomically =head1 VERSION -version 0.903 +version 0.904 =head1 ATTRIBUTES diff --git a/lib/File/KDBX/Util.pm b/lib/File/KDBX/Util.pm index 9557b7d..9e46dfd 100644 --- a/lib/File/KDBX/Util.pm +++ b/lib/File/KDBX/Util.pm @@ -17,7 +17,7 @@ use Time::Piece 1.33; use boolean; use namespace::clean -except => 'import'; -our $VERSION = '0.903'; # VERSION +our $VERSION = '0.904'; # VERSION our %EXPORT_TAGS = ( assert => [qw(DEBUG assert)], @@ -870,7 +870,7 @@ File::KDBX::Util - Utility functions for working with KDBX files =head1 VERSION -version 0.903 +version 0.904 =head1 FUNCTIONS -- 2.44.0