src/Classes/AdldapUsers.php
public function encodePassword($password)
    {
        $password = '"'.$password.'"';

        $encoded = '';

        $length = strlen($password);

        for ($i = 0; $i < $length; $i++) {
            $encoded .= "{$password{$i}
            }\000";
        }

        return $encoded;
    }
public function encodePassword($password)
    {
        $password = '"'.$password.'"';

        $encoded = '';

        $length = strlen($password);

        for ($i = 0; $i < $length; $i++) {
            $encoded .= "{$password{$i}
            }\000";
        }

        return $encoded;
    }
public function encodePassword ( $ password ) { $ password = '"' . $ password . '"' ; $ encoded = '' ; $ length = strlen ( $ password ) ; for ( $ i = 0 ; $ i < $ length ; $ i ++ ) { $ encoded .= "{$password{$i}
            }\000" ; } return $ encoded ; }
Encode a password for transmission over LDAP.

@param string $password The password to encode

@return string
Encode a password for transmission over LDAP .