Hi, I have a database file containing a table UaP with the fields of Username and Password
The password is salted and encrypted and then stored in the database.
However, when I try to take out the value and decrypt it, it doesnt return anything even though I could get the password
put revOpenDatabase("sqlite",path, , , , ) into connID
put revDataFromQuery(tab,return,connID,"SELECT Username FROM UaP where Username like 'User'") into gname
put revDataFromQuery(tab,return,connID,"SELECT Password FROM UaP") into gpw
answer gpw (return "Salted__rtyudfgh†N'AÖÅaKž4XJÌŸ" which is the correct value of the encrypted password)
put "poilkjqweasd123!@#" into tPassword
put "rtyudfgh" into tSalt
decrypt gpw using "aes256" with password tPassword and salt tSalt
put it into gpw
answer gpw (returns nothing)
Is there a solution to this where I can get the password in a text form and decrypt it successfully?
I tried hardcoding the decryption process by doing
[ decrypt "Salted__rtyudfgh†N'AÖÅaKž4XJÌŸ" using "aes256" with password tPassword and salt tSalt ]
and it works fine
Decrypting password in a database
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Decrypting password in a database
Try something like this:
answer the number of char of gpw
and check that it's 33
or
charToNumber(the last char of gpw)
Saw this in another posting where there was a "return" at the end of the string. You wouldn't see it in an "answer" or gpw.
Simon
answer the number of char of gpw
and check that it's 33
or
charToNumber(the last char of gpw)
Saw this in another posting where there was a "return" at the end of the string. You wouldn't see it in an "answer" or gpw.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!