Refactored using mkpasswd to openssl, which is more likely to be installed on systems. It does make my eyes bleed though...