Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Decrypt with CSqlite.ToQmGrid
#1
Hi Gintaras,

I have encrypted the contents of a Sqlite database that I populated from QM using 1|4 (BlowFish+Base64) encryption algorithm
I use CSqlite.ToQmGrid to populate my QMgrid which of course is now filled with gibberish because I am having trouble decrypting.

I tried to modify CSqlite.ToQmGrid to decrypt along the way, like this


Code:
Copy      Help
str GridContentsDecryptorString    
for(r 0 ar.len(2)) for(c 0 ar.len(1))
,GridContentsDecryptorString =  ar[c r]
,GridContentsDecryptorString.decrypt(1|4 GridContentsDecryptorString EncryptionKey)
,s.fromn(s s.len GridContentsDecryptorString GridContentsDecryptorString.len "" 1) ;;array to multistring

It almost works but gives me "failed: Incorrect buffer length" error.

Any ideas on how to get around this.

[Also the data is escaped to using escape(9) because the " and , and 's in the actual text were messing up the Csqlite storage as well. I figure the solution to one will also help the other.....]


Thanks so much!,

Stuart
#2
Should work.
After GridContentsDecryptorString = ar[c r] insert
,out GridContentsDecryptorString
to see if it is exactly the same string as it was when you encrypted it before putting into database. Maybe newlines lost or something.


Forum Jump:


Users browsing this thread: 1 Guest(s)