Read access to KeePass database files.
use info\keepass\{KeePassDatabase, Key};
use io\streams\FileInputStream;
use util\cmd\Console;
$db= KeePassDatabase::open(new FileInputStream('database.kdbx'), new Key('passphrase'));
Console::writeLine($db);
// Show top-level groups and password entries inside these
foreach ($db->groups() as $group) {
foreach ($group->passwords() as $name => $password) {
Console::writeLine($name, ': ', $password);
}
}
$db->close();