views:

22

answers:

1

Which options do I have if I need to store a lot of files or big data chunks with encryption, access them fast and have it all in one file? Something like Sqlite with encryption and optimized for big chunks of data. Also I need ruby binding.

A: 

If you like SQLite, why don't just use SQLite? Since it does have a BLOB datatype, you can always store your encrypted data as a BLOB and decrypt it upon retrieval. Just have Ruby do all the encryption and decryption.

I am not sure where you would want the key(s) to be, but you can store them in another column if you need a different key for every "chunk," or have one key for the entire application (in this case you could have it configurable on Ruby).

NullUserException
In SQLite I like that it is embedded (no daemons, permission problems) and that it is a one file database (folder is ok, but only when it is in specified by application place, not somewhere in the system), but it is not a very fast database especially for big files. Also for me it has strange behaviour: inserting binary data creates sound as if i run `cat binary_file` in terminal.
tig
@tig Well, slowness is one thing you won't be able to solve if you are working with a single large file because *everything* has to be copied over every time you change anything, since you can't delete arbitrary portions of a file. (assuming they don't leave certain chunks just blank)
NullUserException