Grupo,
¿Alguien sabe CÓOMO poner un password en una base de datos SQLIT? es decir quiero que por programa ponerle un password y cuando se vaya a usar la base de datos, entonces quitarle el password para que la puedan usar.
Password en SQLITE
Moderator: Rathinagiri
-
jorge.posadas
- Posts: 205
- Joined: Mon May 19, 2014 7:43 pm
- DBs Used: DBF, SQLite, MS-SQL, ACCESS, MariaDB (en proceso)
- Location: Morelia, Mich. México
- Contact:
Password en SQLITE
Cordialmente
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: jorge.posadas@posoft.mx
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: jorge.posadas@posoft.mx
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Password en SQLITE
Whether you want to encrypt the sqlite database with a password or you want to store the password in the database?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
-
jorge.posadas
- Posts: 205
- Joined: Mon May 19, 2014 7:43 pm
- DBs Used: DBF, SQLite, MS-SQL, ACCESS, MariaDB (en proceso)
- Location: Morelia, Mich. México
- Contact:
Re: Password en SQLITE
Rathinagiri
I want to store the password in the database And if you have an example of how to use it in PRG I would really appreciate it
I want to store the password in the database And if you have an example of how to use it in PRG I would really appreciate it
Cordialmente
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: jorge.posadas@posoft.mx
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: jorge.posadas@posoft.mx
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Password en SQLITE
If you want to store password in databases, there are so many hash functions available.
You can use hb_sha256( cPassword ) -> Hashed Text
Let me give you a small sample to save the password using HMGSQLITE library.
You can use hb_sha256( cPassword ) -> Hashed Text
Let me give you a small sample to save the password using HMGSQLITE library.
Code: Select all
IF AllTrim(pass.newpassword.value) == AllTrim(pass.confpassword.value)
IF msgyesno("Are you sure to save this password?","Confirm Password Change")
lOk := miscsql( oCtlDB, "update usermast u set u.userpw = " + c2sql( hb_sha256( AllTrim( pass.newpassword.value ) ) ) + " where u.usercode = "+ c2sql(cUserCode))
if lOk
msginfo("Password is changed successfully!")
pass.release
else
msgstop( 'Database Error' )
endif
ENDIF
ENDIF
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.