System.Data.SQLite supported hexadecimal passwords, like this: data source=mydb.sqlite;hexpassword=6d696c6b. In case I'm playing in sandbox, and those four bytes are 'milk' in ASCII encoidng, I can also access such database with data source=mydb.sqlite;password=milk, and respectively later with SQLite3MultipleCiphers PRAGMA cipher = rc4 and PRAGMA key = 'milk'.
It's reasonable to assume that under the hood there is just binary key used by the algorithm whatsoever, so it's just a matter of finding a way to pass it down.
Problem is that when it comes to real world databases encrypted with random sets of 32 bytes, just straight decoding them into ASCII (or in local code page, or something similar), chances of getting string valid from the point of view of SQLite are pretty slim. Furthermore, SQLite doesn't let any operators left of pragma's equal, so CASTs, CHARs and ||s are out of option, and there are no variables in SQLite that I know of. So I was not able to access such databases using SQLite3MultipleCiphers. Still I tried passing the key using both special ways (SQLCipher and sqleet) too, but obviously it didn't work.
It would be really handy if it was possible to pass hex passwords in similar way for RC4.
System.Data.SQLite supported hexadecimal passwords, like this:
data source=mydb.sqlite;hexpassword=6d696c6b. In case I'm playing in sandbox, and those four bytes are 'milk' in ASCII encoidng, I can also access such database withdata source=mydb.sqlite;password=milk, and respectively later with SQLite3MultipleCiphersPRAGMA cipher = rc4andPRAGMA key = 'milk'.It's reasonable to assume that under the hood there is just binary key used by the algorithm whatsoever, so it's just a matter of finding a way to pass it down.
Problem is that when it comes to real world databases encrypted with random sets of 32 bytes, just straight decoding them into ASCII (or in local code page, or something similar), chances of getting string valid from the point of view of SQLite are pretty slim. Furthermore, SQLite doesn't let any operators left of pragma's equal, so
CASTs,CHARs and||s are out of option, and there are no variables in SQLite that I know of. So I was not able to access such databases using SQLite3MultipleCiphers. Still I tried passing the key using both special ways (SQLCipher and sqleet) too, but obviously it didn't work.It would be really handy if it was possible to pass hex passwords in similar way for RC4.