KeePassExtensions

Extension methods for KeePass database access via pt.KeePassLibStd. Provides streamlined entry lookup and group navigation for .kdbx files.

public static class KeePassExtensions

1. Methods

1.1. GetAllEntries(KeePassDatabase)

Gets all entries from the database root group (including subgroups).

public static IEnumerable<KeePassEntry> GetAllEntries(this KeePassDatabase database)
Table 1. Parameters
Name Type Description

database

KeePassDatabase

Returns: IEnumerable<KeePassEntry>

1.2. GetEntry(KeePassDatabase, string)

Finds a single entry by its title (case-sensitive). Returns null if not found.

public static KeePassEntry GetEntry(this KeePassDatabase database, string title)
Table 2. Parameters
Name Type Description

database

KeePassDatabase

title

string

Returns: KeePassEntry

1.3. GetGroupEntries(KeePassDatabase, string)

Gets all entries belonging to a specific group name.

public static IEnumerable<KeePassEntry> GetGroupEntries(this KeePassDatabase database, string group)
Table 3. Parameters
Name Type Description

database

KeePassDatabase

group

string

Returns: IEnumerable<KeePassEntry>

1.4. OpenDatabase(string, string)

Opens a KeePass database with the given password and returns a disposable wrapper.

public static KeePassDatabase OpenDatabase(string dbPath, string password)
Table 4. Parameters
Name Type Description

dbPath

string

Absolute path to the .kdbx file.

password

string

Master password for the database.

Returns: KeePassDatabase — A KeePassDatabase that must be disposed after use.