-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/03/2010 10:03 AM, Pierre Krieger wrote:
> For example a stream which handles a simple ROT-13 "encryption" can
> be written in ten minutes (if you know the internals of the iostream library)

My Python wrapper has this functionality as an example although I use XOR
rather than ROT-13.  It is a trivial number of lines of code:

  http://apidoc.apsw.googlecode.com/hg/example.html#example-vfs

But the reason why this works well is that I provide a way of "inheriting"
from an existing VFS implementation.  So all you have to do is override
xOpen to return an xor'd file instance and then override the latter's xRead
and xWrite to xor the data before passing to the parents xRead/xWrite.

With VFS it is good practise to punt to as much existing code as possible,
only providing overridden methods where your VFS adds value.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyoxQYACgkQmOOfHg372QS6pwCcCmBAlb9CJw24dMO1Lg5woyDI
oYcAoNAvr5qXybYxufe/eSZ/z25AmQor
=Cy93
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to