Made SQLITE_HAS_CODEC for WINRT Workout, but facing issues with Unable to Read Large Tables with AggregateException

142 views
Skip to first unread message

Jay

unread,
May 9, 2013, 4:01:16 AM5/9/13
to csharp...@googlegroups.com
Hi,

Thanks for your contribution with an excellent SQLite package purely in C#.

Our team has made SQLITE_HAS_CODEC work with WINRT with the Cryptographic implementation available with the MONO Framework, The Database Encrypts well and Decrypts well as long as the data inside the table are only a few, in some cases only a few rows in the range of 1-50. More than that the read fails with no rows.

We saw AggregateException and saw this is thrown as part of the FileExists code which is specifically written for WINRT,

#if SQLITE_WINRT
    public static bool FileExists(string path)
    {
        bool exists = true;
        try
        {
            Task<StorageFile> fileTask = StorageFile.GetFileFromPathAsync(path).AsTask<StorageFile>();
            fileTask.Wait();
        }
        catch (Exception e)
        {
            AggregateException ae = e as AggregateException;
            if (ae != null && ae.InnerException is FileNotFoundException)
                exists = false;
        }
        return exists;
    }
#endif 

Would like to know when this Exception gets thrown and as well as how to go about resolving this issue we are facing,

Thanks in advance for your help,

Best Regards,
Jay

gma...@gmail.com

unread,
May 24, 2013, 6:20:13 AM5/24/13
to csharp...@googlegroups.com
Hi,

Care you share the code which builds on WinRT with SQLITE_HAS_CODEC ?

Marius

Jay, Jayavasanthan John

unread,
May 24, 2013, 6:44:37 AM5/24/13
to gma...@gmail.com, csharp...@googlegroups.com
Hi, 

I am afraid, I have ditched this effort to integrate encryption with the actual SQLite code.

I did one kinda working version once with the C# Cryptography package from Mono, but there is some error related to encryption/decryption of blocks which I couldn't figure where I was doing wrong, 

Microsoft suggests the best is to use the latest cryptography packages available for WinRT under Windows Foundation Classes, but I couldn't come around to implementing it,

Please let me know if you come across any solution for C#-SQLite, as having a C# implementation of SQLite for WinRT would be very great as it would rule out the need to test in different processor environments and also different packages for different architectures,

Regards,
Jay




--
You received this message because you are subscribed to the Google Groups "C#-SQLite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to csharp-sqlit...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
first me then home
first home then country
first country then world
fools always read inverse

Jay, Jayavasanthan John

unread,
May 24, 2013, 9:04:26 AM5/24/13
to gma...@gmail.com, csharp...@googlegroups.com
Hi,

One more thing, the article which helped me to do my own implementation as the published code is said to be non-commercial is here in this URL, http://greenfishblog.tistory.com/134

HTH,

You got to translate this from Korean to English to understand his article,

Similarly, you can also replace the Crypto implementation in C#-SQLite with open source C# Encryption packages,

Regards,
Jay

Marius Gheorghe

unread,
May 24, 2013, 9:17:53 AM5/24/13
to Jay, Jayavasanthan John, csharp...@googlegroups.com
Thanks,

I'll look into it.  So is p/invoke into the sqlite dll from WINRT reliable ? Everything works fine with the crypto stuff ? Are you using sqlcipher for SSE for crypto ?

Marius

Jay, Jayavasanthan John

unread,
May 24, 2013, 9:30:00 AM5/24/13
to Marius Gheorghe, csharp...@googlegroups.com
Hi,

I am using SQLite-WinRT-Master project to use SQLite from a JS Metro App, & yes it seems reliable. SQLCipher doesn't work with WinRT as openssl is not compatible with WinRT. I added an independent crypto implementation using OpenAES (https://code.google.com/p/openaes/)

Not so clean implementation as it doesn't support some usecases (such as re-key and large page sizes), but it serves my purpose as off now,

If I am able to implement I will anyway go with the C# implementation, as it works cross-platform and architecture, I am searching for an independent implementation very similar to OpenAES in C# to be integrated with C#-SQLite, if in future I need it or my hobby time permits, it will be posted as a WinRT supported crypto implementation for C#-SQLite within this mailing list.

Regards,
Jay

rames...@gmail.com

unread,
Oct 29, 2013, 3:51:02 AM10/29/13
to csharp...@googlegroups.com, Marius Gheorghe
HI all,
Iam looking for SQlLite-WINRT can any one share the code that is compatible for Windows 8 metro WINRT.

Thanks and Regards
Ramesh
Reply all
Reply to author
Forward
0 new messages