def _set_key_passphrase(db_handle, passphrase):
    """
    Set a passphrase for encryption key derivation.

    The key itself can be a passphrase, which is converted to a key using
    PBKDF2 key derivation. The result is used as the encryption key for
    the database. By using this method, there is no way to alter the KDF;
    if you want to do so you should use a raw key instead and derive the
    key using your own KDF.

    :param db_handle: A handle to the SQLCipher database.
    :type db_handle: pysqlcipher.Connection
    :param passphrase: The passphrase used to derive the encryption key.
    :type passphrase: str
    """
    db_handle.cursor().execute("PRAGMA key = '%s'" % passphrase)
