MorningStar wrote:
Quote:
I have played with the cryptography of BDB, only found that when being
given a wrong password, the DB->open method just returns -1, which
means: "Unknown Error".
Then I want to know is there any other mechanism to let me know it's
the wrong password that makes the opening failure instead of all other
possibilies. Or at least let me know it's some kind of format error or
checksum error rather than others. |
You need to enable informational error messages and it will give you
additional
output to tell you what the problem it detect was. See
docs/api_c/env_set_errfile.html or env_set_errpfx.html in your
documentation set.
DB will detect bad passwords, no passwd in an encrypted env, etc.
Sue LoVerso
Sleepycat Software