def _set_cipher(db_handle, cipher='aes-256-cbc'):
    """
    Set the cipher and mode to use for symmetric encryption.

    SQLCipher uses aes-256-cbc as the default cipher and mode of
    operation. It is possible to change this, though not generally
    recommended, using PRAGMA cipher.

    SQLCipher makes direct use of libssl, so all cipher options available
    to libssl are also available for use with SQLCipher. See `man enc` for
    OpenSSL's supported ciphers.

    Implementation Notes:

    * PRAGMA cipher must be called after PRAGMA key and before the first
        actual database operation or it will have no effect.

    * If a non-default value is used PRAGMA cipher to create a database,
        it must also be called every time that database is opened.

    * SQLCipher does not implement its own encryption. Instead it uses the
        widely available and peer-reviewed OpenSSL libcrypto for all
        cryptographic functions.

    :param db_handle: A handle to the SQLCipher database.
    :type db_handle: pysqlcipher.Connection
    :param cipher: The cipher and mode to use.
    :type cipher: str
    """
    db_handle.cursor().execute("PRAGMA cipher = '%s'" % cipher)
