def password_hash(password):
    """Hash the password, using bcrypt+sha256.

    .. versionchanged:: 1.1.0

    :param str password: Password in plaintext
    :return: password hash
    :rtype: str
    """
    try:
        return bcrypt_sha256.encrypt(password)
    except TypeError:
        return bcrypt_sha256.encrypt(password.decode('utf-8'))
Hash the password, using bcrypt+sha256.

    .. versionchanged:: 1.1.0

    :param str password: Password in plaintext
    :return: password hash
    :rtype: str