Encode the provided plain text password using the encoding if provided
and return it in an LDAP-style representation.
pw_validate
pw_validate ( reference, attempt )
Validate the provided password string, which uses LDAP-style encoding
notation. Reference is the correct password, attempt is clear text
password attempt.