You could encrypt it under a password.

ezcrypto seems to do what it says on the tin.  You need openssl
installed, but once it is, encrypting the content is simple:

str = "Your private stuffs here"
k = EzCrypto::Key.with_password( "mypassword", "somesalt" )
ciphertxt = k.encrypt( str )

It uses 128 bit CBC AES by default, which should be adequate.

cheers
J

On 4/3/06, Stian Hole <stian.hole / gmail.com> wrote:
> Greetings,
>
> I am currently planning to write a diary type application using Ruby and
> FXruby, and I am therefor looking for a secure way of storing data.
> Using plain text files is of course out of the question, but I was
> thinking of using SQLite, could that be secure enough? The idea is that
> I don't want people to be able to simply view a users diary entries by
> opening a file (preferrably, the data should be secured with a password
> (and username) defined by the owner).
>
> I am fairly experienced with databases and programming, but rather new
> to Ruby and having to think about the fact that other people might be
> using my program and therefor unknown people might have direct access to
> the computer.
>
> Thanks for any answers, tips and suggestions :)
>
> Best regards,
> Stian Hole
>
> --
> Posted via http://www.ruby-forum.com/.
>
>