Registers a custom algorithm in the KeePass password generator that turns a memorable sentence into a password (the Bruce Schneier method).
"I bought my first car in 1995 for five thousand dollars and it was blue!"
↓
Ibm1ci1995f51k$&iwB!
- Strength comes entirely from the sentence being unpredictable. Avoid quotes, lyrics, and anything guessable. The strength meter flags short sentences.
- This implementation avoids C# managed strings and uses only
char[]which are zeroed out when no longer needed. - The generated password is held in a KeePass
ProtectedString(XOR-obfuscated in memory). The sentence is cleared from the input fields on dialog close. - For passwords that don't need to be memorable, KeePass's built-in random generator is stronger.
The sentence is never stored. Only the (non-secret) transformation settings are saved in the KeePass profile.
- Download
SentenceToPassword.plgxorSentenceToPassword.dllfrom Releases into KeePass'sPluginsfolder. - Restart KeePass.
- Confirm under Tools → Plugins that
SentenceToPasswordappears.
- In an entry, open Password → Open Password Generator…
- Select Generate using custom algorithm → Sentence to Password.
- Click OK, type your sentence, click OK.
| # | Rule | Example |
|---|---|---|
| 1 | Pure number → kept whole | 1995 → 1995 |
| 2 | Number word / ordinal → digit(s) | five → 5, thousand → 1k, first → 1 |
| 3 | Substitution map → symbol | and → &, plus → +, not → ! |
| 4 | Otherwise → first N letter(s) | bought → b |
| Word | Symbol | Word | Symbol |
|---|---|---|---|
and |
& |
or |
| |
at |
@ |
not |
! |
plus |
+ |
minus |
- |
times |
* |
equals |
= |
percent |
% |
dollar / dollars |
$ |
number |
# |
question |
? |
Single digits (zero–nine), teens (ten–nineteen), tens (twenty–ninety),
hundred → 100, thousand → 1k, million → 1m, billion → 1b,
and all ordinal forms (first–nineteenth, twentieth–ninetieth,
hundredth, thousandth).
Accessible via the Settings… button in the sentence prompt or the settings icon next to the algorithm in the KeePass generator:
| Setting | Effect |
|---|---|
| Capitalize initials | None / First & last word / Every word |
| Letters per word | 1–5 |
| Word separator | None / preset single char (- _ . @ # ! / |) Custom pattern — type up to 8 characters and they cycle between words (e.g. @&% gives I@a&i%o) |
| Minimum word length | Skip words shorter than N letters (1–5) |
| Keep numbers as-is | 1995 stays 1995 |
| Convert number words | five → 5, thousand → 1k |
| Symbol substitutions | and → &, plus → +, not → !, … |
| Preserve punctuation | blue! keeps its ! |
| Leetspeak | a→@ e→3 i→1 o→0 s→$ |
| Reverse letter order | Take letters from the end of each word instead |
| Include tail letter | Append the last letter of each word after the initial(s) (bought → bt) |
| Skip stop words | Drop common function words (the, is, was, with, …) |
To extend the built-in word maps, edit NumberWords, Substitutions and StopWords in
SentenceTransformer.cs.
The sentence box grows automatically as you type, up to five lines, then scrolls. Check Hide what I type to switch to a masked single-line field.
Requires KeePass 2.x and .NET Framework 4.x tooling. The project targets C# 5 — do not use C# 6+ syntax.
For IntelliSense in your IDE, set the KeePass reference's HintPath in the .csproj to your local KeePass.exe.
A PowerShell script is provided to compile the plugin into plgx and move it into the Plugins folder.
It assumes the project folder lives inside your KeePass installation directory alongside KeePass.exe.
.\build-plgx.ps1Manual build:
KeePass.exe --plgx-create "PATH_TO_THIS_PROJECT_ROOT"
