SQLite Forum

Changing the checksum VFS
I have a client who is working on safety-critical software, where it is much preferred for the software to crash than to accidentally use the wrong number.  I've taken a look at the checksum VFS:


However, the software has existing standards for checksumming and the 8-bit method used by that specific code isn't quite what they want.  Ideally, more bits and a different, specific, algorithm.

The source code to the VFS seems pretty clear.  We have access to good programmers familiar with the SQLite API, and they already compile from SQLite source, and the SQLite CLI, using their preferred development platform.

Would that VFS be a good place to start in implementing a different checksum method ?  Are there any gotchas not made plain by the source code ?  The first changes would probably be <code>int n = 16</code> and <code>.filectrl reserve_bytes 16</code> in appropriate places.

(I'll be doing my best to get any changes made available to the SQLite dev team, or available under one of the standard Open licenses.  Unfortunately, due to the way the project is funded, this is not easy and inevitable.)