Really? I'm not aware of this limitation, and there are no issues reports against the Moodle Tracker that I can find. Perhaps you should investigate this further.
On Moodle master, I just tried setting a 32 character password for one of my non-LDAP accounts and all works as expected. I suspect your problem lies somewhere outside of the core Moodle code-base and it certainly isn't in the login dialogue. I've also had a quick look through the ldap code and can't see any such trimming going on.
Andrew Nicols