private function getValidHash($password)
    {
        if (Password\Blowfish::detect($password)) {
            return $password;
        }
        if (Password\PHPASS::detect($password)) {
            return $password;
        }
        if (strlen($password) < 6) {
            throw new AccessControlException('Can not save a password with a length shorter than 6 characters!');
        }

        return $this->passwordFactory->createHash($password, '$2y$');
    }
private function getValidHash($password)
    {
        if (Password\Blowfish::detect($password)) {
            return $password;
        }
        if (Password\PHPASS::detect($password)) {
            return $password;
        }
        if (strlen($password) < 6) {
            throw new AccessControlException('Can not save a password with a length shorter than 6 characters!');
        }

        return $this->passwordFactory->createHash($password, '$2y$');
    }
private function getValidHash ( $ password ) { if ( Password \ Blowfish :: detect ( $ password ) ) { return $ password ; } if ( Password \ PHPASS :: detect ( $ password ) ) { return $ password ; } if ( strlen ( $ password ) < 6 ) { throw new AccessControlException ( 'Can not save a password with a length shorter than 6 characters!' ) ; } return $ this -> passwordFactory -> createHash ( $ password , '$2y$' ) ; }
Return a valid hash for a password, of if the password is already hashed
just return as is.

@param string $password

@throws AccessControlException

@return string
Return a valid hash for a password of if the password is already hashed just return as is .