I think the default password handling is a bit out of date. It uses the crypt function (at least on linux) which is defaulting to DES algorithm as far as I can tell with a salt that takes the first 12 bits of the character's name. It is not even as secure as md5 which itself is not good anymore. The glib version of crypt allows for SHA256 and SHA512 which are pretty current, using the SHA2 algorithm. The government phased out SHA1 for new applications there from what I have read. According to the documentation the size of the encrypted string would be 43 characters for SHA256.
man7.org/linux/man-pages/man3/crypt.3.html
Now, I'm not sure how this would work on other systems or if it is better to pull in openssl libraries. It looks like one might use the EVP_sha256 function, but I've never used it myself. I'm not sure if the encryption export restrictions apply anymore as all of this stuff is all over the web. Anyone have thoughts on this?
wiki.openssl.org/index.php/EVP