def _b64encode(self, pwhash):
        if self._target == 'ldap':
            return base64.b64encode(pwhash)
        return pwhash
Encode :keyword:`pwhash` using base64 if needed.
dataset/ETHPy150Open tonioo/modoboa/modoboa/core/password_hashers/base.py/PasswordHasher._b64encode