public function generate(
        $type = self::PASSWORD_ALPHANUM_SPECIAL,
        $length = 12,
        $returnType = self::RETURN_TYPE_PLAIN
    ) {
        // empty pass
        $password = '';

        switch ($type) {
            case self::PASSWORD_ALPHANUM:
                // build password
                for ($i = 0; $i < $length; ++$i) {
                    $password .= $this->getRandomCharacter(self::$_RANGE_ALPHANUM['default']);
                }
                break;
            case self::PASSWORD_ALPHANUM_SPECIAL:
                // build password
                for ($i = 0; $i < $length; ++$i) {
                    $password .= $this->getRandomCharacter(self::$_RANGE_ALPHANUM_SPECIAL['default']);
                }
                break;
            case self::PASSWORD_ALPHANUM_SPECIAL_HARDCORE:
                // build password
                for ($i = 0; $i < $length; ++$i) {
                    $password .= $this->getRandomCharacter(self::$_RANGE_ALPHANUM_SPECIAL_HARDCORE['default']);
                }
                break;
            case self::PASSWORD_USERFRIENDLY:
                $password = $this->_createUserFriendlyPassword(self::$_RANGE_USERFRIENDLY, $length);
                break;
            case self::PASSWORD_USERFRIENDLY_REMEMBER:
                $password = $this->_createUserFriendlyPassword(self::$_RANGE_USERFRIENDLY_REMEMBER, $length);
                break;
        }

        // check for transformation of password to hash
        switch ($returnType) {
            case self::RETURN_TYPE_MD5:
                $password = $this->getMd5Hash($password);
                break;
            case self::RETURN_TYPE_PASSWORDHASH:
                $password = $this->getPasswordhash($password);
                break;
        }

        // return new created password
        return $password;
    }