Günter Greschenz <[EMAIL PROTECTED]> wrote:
i implemented crypting for values:
insert into test (x, y, z) values(encrypt('this is a test', 'pwd'),
'foo', 'bar')
insert into test (x, y, z) values(encrypt('this is test 2', 'pwd'),
'foo2', 'bar2')
...
select decrypt(x, 'pwd') x, y, z from test where decrypt(x, 'pwd')
like 'this%'
but setting the password each time is quiet time-expensive.
so i want to set the password only once:
pragma password='pwd'
insert into test values(encrypt('this is a test'), 'foo', 'bar')
insert into test values(encrypt('this is test 2'), 'foo2', 'bar2')
Apparently these are custom functions defined in your application. You
can just store a password in a global variable somewhere, and have the
functions refer to it. Or, you can pass it in via pUserData parameter to
sqlite3_create_function. Or, if you want it to persist, you can create a
table in the database just for this purpose, store the password there,
and have these custom functions read it.
Igor Tandetnik
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------