Re: [sqlite] how to process password

2012-07-29 Thread Robert Myers
Encryption is very hard to do right, so in general, let someone else do it.

We use SEE (http://www.hwaci.com/sw/sqlite/see.html) with the key
generated from a password by PBKDF2 and a high number of iterations.
Previously, columns were encrypted with OS functions that made it
impossible to move the database from machine to machine, as well as
really bloating up the data in those columns.

Don't forget to pull the password from secure functions, don't take it
from the command line or getline.

On 7/27/2012 9:50 AM, yanhong.ye wrote:
> I need insert any my bank-card information to sqlite db, so when I insert the 
> car number like '3312' and car password like '7711', but I wanna nobody can 
> see the password, so I create a function encode('7711','key') and 
> decode(select from stable where carnum=3312, 'key') to see the password, the 
> key is like 'plkey777' to encode or decode the password , but I don't know 
> how to realize that. and I have a function to encode and decode :  
> procode(aa,bb,flag);
> char *aa="plkey777";
> char *bb="7711";
> procode(aa,bb,1);   //here is to encoding the char ,bb result is bb
>
> insert into stable select "3312",bb;
>
>
> procode(aa,bb,2);//here is to decoding the char ,bb result is bb
> select carbumber,procode(aa,bb,2) from stable 
>
> I don't know how to do this. the code upside isPseudo code。
> ___
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] how to process password

2012-07-29 Thread yanhong.ye
I need insert any my bank-card information to sqlite db, so when I insert the 
car number like '3312' and car password like '7711', but I wanna nobody can see 
the password, so I create a function encode('7711','key') and decode(select 
from stable where carnum=3312, 'key') to see the password, the key is like 
'plkey777' to encode or decode the password , but I don't know how to realize 
that. and I have a function to encode and decode :  procode(aa,bb,flag);
char *aa="plkey777";
char *bb="7711";
procode(aa,bb,1);   //here is to encoding the char ,bb result is bb

insert into stable select "3312",bb;


procode(aa,bb,2);//here is to decoding the char ,bb result is bb
select carbumber,procode(aa,bb,2) from stable 

I don't know how to do this. the code upside isPseudo code。
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users