<?xml version="1.0" encoding="windows-1252"?>
<node id="1010748" title="Re: sqlcipher for sqlite" created="2012-12-28 16:42:19" updated="2012-12-28 16:42:19">
<type id="11">
note</type>
<author id="5348">
Corion</author>
<data>
<field name="doctext">
&lt;p&gt;[mod://DBD::SQLite] basically gets compiled from the SQLite source code, together with some Perl-specific C code ("XS code"). Simply replacing the SQLite.dll with a DLL that was not compiled from the XS code in [mod://DBD::SQLite] will not work. You will have to recompile DBD::SQLite with the sqlcipher source code and then also think hard about the new API to pass the decryption key around.&lt;/p&gt;
&lt;p&gt;Recompiling DBD::SQLite with the sqlcipher code should be fairly easy:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download the sqlcipher package&lt;/li&gt;
&lt;li&gt;Download and change into the DBD::SQLite package directory:
&lt;c&gt;
&gt; cpan
cpan[1]&gt; look DBD::SQLite
&lt;/c&gt;
&lt;/li&gt;
&lt;li&gt;Replace the &lt;c&gt;sqlite3.c&lt;/c&gt; and &lt;c&gt;sqlite3.h&lt;/c&gt; files with the files from sqlcipher&lt;/li&gt;
&lt;li&gt;Use the standard invocation to compile and install the module:&lt;/p&gt;
&lt;c&gt;
perl Makefile.PL
dmake
dmake test
dmake install
&lt;/c&gt;
&lt;/li&gt;
&lt;/ol&gt;</field>
<field name="root_node">
1010722</field>
<field name="parent_node">
1010722</field>
</data>
</node>
