+subtest 'KDF parameters' => sub {
+ my $kdbx = File::KDBX->new;
+ $kdbx->version(KDBX_VERSION_4_0);
+
+ is $kdbx->kdf_parameters->{+KDF_PARAM_UUID}, KDF_UUID_AES, 'Default KDF type is correct';
+ cmp_ok $kdbx->transform_rounds, '==', 100_000, 'Default transform rounds is correct';
+
+ $kdbx->transform_rounds(17);
+ cmp_deeply $kdbx->kdf_parameters, {
+ "\$UUID" => "\311\331\363\232b\212D`\277t\r\b\301\212O\352",
+ R => num(17),
+ S => ignore(),
+ }, 'Set transform rounds for AES KDF';
+
+ $kdbx->kdf_parameters({KDF_PARAM_UUID() => KDF_UUID_ARGON2D});
+ cmp_ok $kdbx->transform_rounds, '==', 10, 'Default Argon2D transform rounds is correct';
+
+ $kdbx->transform_rounds(17);
+ cmp_deeply $kdbx->kdf_parameters, {
+ "\$UUID" => "\357cm\337\214)DK\221\367\251\244\3\343\n\f",
+ I => num(17),
+ }, 'Set transform rounds for Argon KDF';
+};
+