Yeah I thought about rolling my own, and came to the same conclusion. As fun as it would be
I see you're right, however the part that I need to do (because the rest is handled by a third party library) is provide what's labelled on that page as an "NT Hash" of the user's password, which is the password converted to UTF16LE then hashed using MD4.
I guess an OS library is the best option. The windows CryptoAPI functions seem to be what I'm after, but on *nix platforms I'm not so sure where to start, and they're my main target platforms.
Oh well, I guess I'll settle for sending the plain-text password to a PHP script which can easily create the "NT Hash".